home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / tmnt.c < prev    next >
C/C++ Source or Header  |  2000-05-06  |  137KB  |  3,605 lines

  1. /***************************************************************************
  2.  
  3. This driver contains several Konami 68000 based games. For the most part they
  4. run on incompatible boards, but since 90% of the work is done by the custom
  5. ICs emulated in vidhrdw/konamiic.c, we can just as well keep them all
  6. together.
  7.  
  8. driver by Nicola Salmoria
  9.  
  10. TODO:
  11.  
  12. - detatwin: sprites are left on screen during attract mode
  13. - sprite priorities in ssriders (protection)
  14. - sprite colors / zoomed placement in tmnt2 (protection)
  15. - is IPT_VBLANK really vblank or something else? Investigate.
  16. - shadows: they should not be drawn as opaque sprites, instead they should
  17.   make the background darker
  18. - wrong sprites in ssriders at the end of the saloon level. They have the
  19.   "shadow" bit on, but should actually highlight.
  20. - sprite lag, quite evident in lgtnfght and mia but also in the others. Also
  21.   see the left corner of the wall in punkshot DownTown level
  22. - some slowdowns in lgtnfght when there are many sprites on screen - vblank issue?
  23.  
  24. ***************************************************************************/
  25.  
  26. #include "driver.h"
  27. #include "vidhrdw/generic.h"
  28. #include "vidhrdw/konamiic.h"
  29. #include "machine/eeprom.h"
  30. #include "cpu/m68000/m68000.h"
  31. #include "cpu/z80/z80.h"
  32.  
  33.  
  34. WRITE_HANDLER( tmnt_paletteram_w );
  35. WRITE_HANDLER( tmnt_0a0000_w );
  36. WRITE_HANDLER( punkshot_0a0020_w );
  37. WRITE_HANDLER( lgtnfght_0a0018_w );
  38. WRITE_HANDLER( detatwin_700300_w );
  39. WRITE_HANDLER( glfgreat_122000_w );
  40. WRITE_HANDLER( ssriders_1c0300_w );
  41. WRITE_HANDLER( tmnt_priority_w );
  42. int mia_vh_start(void);
  43. int tmnt_vh_start(void);
  44. int punkshot_vh_start(void);
  45. void punkshot_vh_stop(void);
  46. int lgtnfght_vh_start(void);
  47. void lgtnfght_vh_stop(void);
  48. int detatwin_vh_start(void);
  49. void detatwin_vh_stop(void);
  50. int glfgreat_vh_start(void);
  51. void glfgreat_vh_stop(void);
  52. int thndrx2_vh_start(void);
  53. void thndrx2_vh_stop(void);
  54. void mia_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  55. void tmnt_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  56. void punkshot_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  57. void lgtnfght_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  58. void glfgreat_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  59. void ssriders_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  60. void thndrx2_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  61. static int tmnt_soundlatch;
  62.  
  63.  
  64. static READ_HANDLER( K052109_word_r )
  65. {
  66.     offset >>= 1;
  67.     return K052109_r(offset + 0x2000) | (K052109_r(offset) << 8);
  68. }
  69.  
  70. static WRITE_HANDLER( K052109_word_w )
  71. {
  72.     offset >>= 1;
  73.     if ((data & 0xff000000) == 0)
  74.         K052109_w(offset,(data >> 8) & 0xff);
  75.     if ((data & 0x00ff0000) == 0)
  76.         K052109_w(offset + 0x2000,data & 0xff);
  77. }
  78.  
  79. static READ_HANDLER( K052109_word_noA12_r )
  80. {
  81.     /* some games have the A12 line not connected, so the chip spans */
  82.     /* twice the memory range, with mirroring */
  83.     offset = ((offset & 0x6000) >> 1) | (offset & 0x0fff);
  84.     return K052109_word_r(offset);
  85. }
  86.  
  87. static WRITE_HANDLER( K052109_word_noA12_w )
  88. {
  89.     /* some games have the A12 line not connected, so the chip spans */
  90.     /* twice the memory range, with mirroring */
  91.     offset = ((offset & 0x6000) >> 1) | (offset & 0x0fff);
  92.     K052109_word_w(offset,data);
  93. }
  94.  
  95. /* the interface with the 053245 is weird. The chip can address only 0x800 bytes */
  96. /* of RAM, but they put 0x4000 there. The CPU can access them all. Address lines */
  97. /* A1, A5 and A6 don't go to the 053245. */
  98. static READ_HANDLER( K053245_scattered_word_r )
  99. {
  100.     if (offset & 0x0062)
  101.         return READ_WORD(&spriteram[offset]);
  102.     else
  103.     {
  104.         offset = ((offset & 0x001c) >> 1) | ((offset & 0x3f80) >> 3);
  105.         return K053245_word_r(offset);
  106.     }
  107. }
  108.  
  109. static WRITE_HANDLER( K053245_scattered_word_w )
  110. {
  111.     if (offset & 0x0062)
  112.         COMBINE_WORD_MEM(&spriteram[offset],data);
  113.     else
  114.     {
  115.         offset = ((offset & 0x001c) >> 1) | ((offset & 0x3f80) >> 3);
  116. //if ((offset&0xf) == 0)
  117. //    logerror("%04x: write %02x to spriteram %04x\n",cpu_get_pc(),data,offset);
  118.         K053245_word_w(offset,data);
  119.     }
  120. }
  121.  
  122. static READ_HANDLER( K053244_halfword_r )
  123. {
  124.     return K053244_r(offset >> 1);
  125. }
  126.  
  127. static WRITE_HANDLER( K053244_halfword_w )
  128. {
  129.     if ((data & 0x00ff0000) == 0)
  130.         K053244_w(offset >> 1,data & 0xff);
  131. }
  132.  
  133. static READ_HANDLER( K053244_word_noA1_r )
  134. {
  135.     offset &= ~2;    /* handle mirror address */
  136.  
  137.     return K053244_r(offset/2 + 1) | (K053244_r(offset/2) << 8);
  138. }
  139.  
  140. static WRITE_HANDLER( K053244_word_noA1_w )
  141. {
  142.     offset &= ~2;    /* handle mirror address */
  143.  
  144.     if ((data & 0xff000000) == 0)
  145.         K053244_w(offset/2,(data >> 8) & 0xff);
  146.     if ((data & 0x00ff0000) == 0)
  147.         K053244_w(offset/2 + 1,data & 0xff);
  148. }
  149.  
  150. static WRITE_HANDLER( K053251_halfword_w )
  151. {
  152.     if ((data & 0x00ff0000) == 0)
  153.         K053251_w(offset >> 1,data & 0xff);
  154. }
  155.  
  156. static WRITE_HANDLER( K053251_halfword_swap_w )
  157. {
  158.     if ((data & 0xff000000) == 0)
  159.         K053251_w(offset >> 1,(data >> 8) & 0xff);
  160. }
  161.  
  162. static READ_HANDLER( K054000_halfword_r )
  163. {
  164.     return K054000_r(offset >> 1);
  165. }
  166.  
  167. static WRITE_HANDLER( K054000_halfword_w )
  168. {
  169.     if ((data & 0x00ff0000) == 0)
  170.         K054000_w(offset >> 1,data & 0xff);
  171. }
  172.  
  173.  
  174.  
  175.  
  176. static int punkshot_interrupt(void)
  177. {
  178.     if (K052109_is_IRQ_enabled()) return m68_level4_irq();
  179.     else return ignore_interrupt();
  180.  
  181. }
  182.  
  183. static int lgtnfght_interrupt(void)
  184. {
  185.     if (K052109_is_IRQ_enabled()) return m68_level5_irq();
  186.     else return ignore_interrupt();
  187.  
  188. }
  189.  
  190.  
  191.  
  192. WRITE_HANDLER( tmnt_sound_command_w )
  193. {
  194.     soundlatch_w(0,data & 0xff);
  195. }
  196.  
  197. static READ_HANDLER( punkshot_sound_r )
  198. {
  199.     /* If the sound CPU is running, read the status, otherwise
  200.        just make it pass the test */
  201.     if (Machine->sample_rate != 0)     return K053260_r(2 + offset/2);
  202.     else return 0x80;
  203. }
  204.  
  205. static READ_HANDLER( detatwin_sound_r )
  206. {
  207.     /* If the sound CPU is running, read the status, otherwise
  208.        just make it pass the test */
  209.     if (Machine->sample_rate != 0)     return K053260_r(2 + offset/2);
  210.     else return offset ? 0xfe : 0x00;
  211. }
  212.  
  213. static READ_HANDLER( glfgreat_sound_r )
  214. {
  215.     /* If the sound CPU is running, read the status, otherwise
  216.        just make it pass the test */
  217.     if (Machine->sample_rate != 0)     return K053260_r(2 + offset/2) << 8;
  218.     else return 0;
  219. }
  220.  
  221. static WRITE_HANDLER( glfgreat_sound_w )
  222. {
  223.     if ((data & 0xff000000) == 0)
  224.         K053260_w(offset >> 1,(data >> 8) & 0xff);
  225.  
  226.     if (offset == 2) cpu_cause_interrupt(1,0xff);
  227. }
  228.  
  229. static READ_HANDLER( tmnt2_sound_r )
  230. {
  231.     /* If the sound CPU is running, read the status, otherwise
  232.        just make it pass the test */
  233.     if (Machine->sample_rate != 0)     return K053260_r(2 + offset/2);
  234.     else return offset ? 0x00 : 0x80;
  235. }
  236.  
  237.  
  238. READ_HANDLER( tmnt_sres_r )
  239. {
  240.     return tmnt_soundlatch;
  241. }
  242.  
  243. WRITE_HANDLER( tmnt_sres_w )
  244. {
  245.     /* bit 1 resets the UPD7795C sound chip */
  246.     if ((data & 0x02) == 0)
  247.     {
  248.         UPD7759_reset_w(0,(data & 0x02) >> 1);
  249.     }
  250.  
  251.     /* bit 2 plays the title music */
  252.     if (data & 0x04)
  253.     {
  254.         if (!sample_playing(0))    sample_start(0,0,0);
  255.     }
  256.     else sample_stop(0);
  257.     tmnt_soundlatch = data;
  258. }
  259.  
  260.  
  261. static int tmnt_decode_sample(const struct MachineSound *msound)
  262. {
  263.     int i;
  264.     signed short *dest;
  265.     unsigned char *source = memory_region(REGION_SOUND3);
  266.     struct GameSamples *samples;
  267.  
  268.  
  269.     if ((Machine->samples = malloc(sizeof(struct GameSamples))) == NULL)
  270.         return 1;
  271.  
  272.     samples = Machine->samples;
  273.  
  274.     if ((samples->sample[0] = malloc(sizeof(struct GameSample) + (0x40000)*sizeof(short))) == NULL)
  275.         return 1;
  276.  
  277.     samples->sample[0]->length = 0x40000*2;
  278.     samples->sample[0]->smpfreq = 20000;    /* 20 kHz */
  279.     samples->sample[0]->resolution = 16;
  280.     dest = (signed short *)samples->sample[0]->data;
  281.     samples->total = 1;
  282.  
  283.     /*    Sound sample for TMNT.D05 is stored in the following mode:
  284.      *
  285.      *    Bit 15-13:    Exponent (2 ^ x)
  286.      *    Bit 12-4 :    Sound data (9 bit)
  287.      *
  288.      *    (Sound info courtesy of Dave <dayvee@rocketmail.com>)
  289.      */
  290.  
  291.     for (i = 0;i < 0x40000;i++)
  292.     {
  293.         int val = source[2*i] + source[2*i+1] * 256;
  294.         int exp = val >> 13;
  295.  
  296.           val = (val >> 4) & (0x1ff);    /* 9 bit, Max Amplitude 0x200 */
  297.         val -= 0x100;                    /* Centralize value    */
  298.  
  299.         val <<= exp;
  300.  
  301.         dest[i] = val;
  302.     }
  303.  
  304.     /*    The sample is now ready to be used.  It's a 16 bit, 22khz sample.
  305.      */
  306.  
  307.     return 0;
  308. }
  309.  
  310. static int sound_nmi_enabled;
  311.  
  312. static void sound_nmi_callback( int param )
  313. {
  314.     cpu_set_nmi_line( 1, ( sound_nmi_enabled ) ? CLEAR_LINE : ASSERT_LINE );
  315.  
  316.     sound_nmi_enabled = 0;
  317. }
  318.  
  319. static void nmi_callback(int param)
  320. {
  321.     cpu_set_nmi_line(1,ASSERT_LINE);
  322. }
  323.  
  324. static WRITE_HANDLER( sound_arm_nmi_w )
  325. {
  326. //    sound_nmi_enabled = 1;
  327.     cpu_set_nmi_line(1,CLEAR_LINE);
  328.     timer_set(TIME_IN_USEC(50),0,nmi_callback);    /* kludge until the K053260 is emulated correctly */
  329. }
  330.  
  331.  
  332.  
  333.  
  334.  
  335. static READ_HANDLER( punkshot_kludge_r )
  336. {
  337.     /* I don't know what's going on here; at one point, the code reads location */
  338.     /* 0xffffff, and returning 0 causes the game to mess up - locking up in a */
  339.     /* loop where the ball is continuously bouncing from the basket. Returning */
  340.     /* a random number seems to prevent that. */
  341.     return rand();
  342. }
  343.  
  344. static READ_HANDLER( ssriders_kludge_r )
  345. {
  346.     int data = cpu_readmem24bew_word(0x105a0a);
  347.  
  348.     logerror("%06x: read 1c0800 (D7=%02x 105a0a=%02x)\n",cpu_get_pc(),cpu_get_reg(M68K_D7),data);
  349.  
  350.     if (data == 0x075c) data = 0x0064;
  351.  
  352.     if ( cpu_readmem24bew_word(cpu_get_pc()) == 0x45f9 )
  353.     {
  354.         data = -( ( cpu_get_reg(M68K_D7) & 0xff ) + 32 );
  355.         data = ( ( data / 8 ) & 0x1f ) * 0x40;
  356.         data += ( ( ( cpu_get_reg(M68K_D6) & 0xffff ) + ( K052109_r(0x1a01) * 256 )
  357.                 + K052109_r(0x1a00) + 96 ) / 8 ) & 0x3f;
  358.     }
  359.  
  360.     return data;
  361. }
  362.  
  363.  
  364.  
  365. /***************************************************************************
  366.  
  367.   EEPROM
  368.  
  369. ***************************************************************************/
  370.  
  371. static int init_eeprom_count;
  372.  
  373.  
  374. static struct EEPROM_interface eeprom_interface =
  375. {
  376.     7,                /* address bits */
  377.     8,                /* data bits */
  378.     "011000",        /*  read command */
  379.     "011100",        /* write command */
  380.     0,                /* erase command */
  381.     "0100000000000",/* lock command */
  382.     "0100110000000" /* unlock command */
  383. };
  384.  
  385. static void nvram_handler(void *file,int read_or_write)
  386. {
  387.     if (read_or_write)
  388.         EEPROM_save(file);
  389.     else
  390.     {
  391.         EEPROM_init(&eeprom_interface);
  392.  
  393.         if (file)
  394.         {
  395.             init_eeprom_count = 0;
  396.             EEPROM_load(file);
  397.         }
  398.         else
  399.             init_eeprom_count = 10;
  400.     }
  401. }
  402.  
  403. static READ_HANDLER( detatwin_coin_r )
  404. {
  405.     int res;
  406.     static int toggle;
  407.  
  408.     /* bit 3 is service button */
  409.     /* bit 6 is ??? VBLANK? OBJMPX? */
  410.     res = input_port_2_r(0);
  411.     if (init_eeprom_count)
  412.     {
  413.         init_eeprom_count--;
  414.         res &= 0xf7;
  415.     }
  416.     toggle ^= 0x40;
  417.     return res ^ toggle;
  418. }
  419.  
  420. static READ_HANDLER( detatwin_eeprom_r )
  421. {
  422.     int res;
  423.  
  424.     /* bit 0 is EEPROM data */
  425.     /* bit 1 is EEPROM ready */
  426.     res = EEPROM_read_bit() | input_port_3_r(0);
  427.     return res;
  428. }
  429.  
  430. static READ_HANDLER( ssriders_eeprom_r )
  431. {
  432.     int res;
  433.     static int toggle;
  434.  
  435.     /* bit 0 is EEPROM data */
  436.     /* bit 1 is EEPROM ready */
  437.     /* bit 2 is VBLANK (???) */
  438.     /* bit 7 is service button */
  439.     res = EEPROM_read_bit() | input_port_3_r(0);
  440.     if (init_eeprom_count)
  441.     {
  442.         init_eeprom_count--;
  443.         res &= 0x7f;
  444.     }
  445.     toggle ^= 0x04;
  446.     return res ^ toggle;
  447. }
  448.  
  449. static WRITE_HANDLER( ssriders_eeprom_w )
  450. {
  451.     /* bit 0 is data */
  452.     /* bit 1 is cs (active low) */
  453.     /* bit 2 is clock (active high) */
  454.     EEPROM_write_bit(data & 0x01);
  455.     EEPROM_set_cs_line((data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
  456.     EEPROM_set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE);
  457.  
  458.     /* bit 5 selects sprite ROM for testing in TMNT2 */
  459.     K053244_bankselect((data & 0x20) >> 5);
  460. }
  461.  
  462.  
  463. static struct EEPROM_interface thndrx2_eeprom_interface =
  464. {
  465.     7,                /* address bits */
  466.     8,                /* data bits */
  467.     "011000",        /*  read command */
  468.     "010100",        /* write command */
  469.     0,                /* erase command */
  470.     "0100000000000",/* lock command */
  471.     "0100110000000" /* unlock command */
  472. };
  473.  
  474. static void thndrx2_nvram_handler(void *file,int read_or_write)
  475. {
  476.     if (read_or_write)
  477.         EEPROM_save(file);
  478.     else
  479.     {
  480.         EEPROM_init(&thndrx2_eeprom_interface);
  481.  
  482.         if (file)
  483.         {
  484.             init_eeprom_count = 0;
  485.             EEPROM_load(file);
  486.         }
  487.         else
  488.             init_eeprom_count = 10;
  489.     }
  490. }
  491.  
  492. static READ_HANDLER( thndrx2_in0_r )
  493. {
  494.     int res;
  495.  
  496.     res = input_port_0_r(0);
  497.     if (init_eeprom_count)
  498.     {
  499.         init_eeprom_count--;
  500.         res &= 0xf7ff;
  501.     }
  502.     return res;
  503. }
  504.  
  505. static READ_HANDLER( thndrx2_eeprom_r )
  506. {
  507.     int res;
  508.     static int toggle;
  509.  
  510.     /* bit 0 is EEPROM data */
  511.     /* bit 1 is EEPROM ready */
  512.     /* bit 3 is VBLANK (???) */
  513.     /* bit 7 is service button */
  514.     res = (EEPROM_read_bit() << 8) | input_port_1_r(0);
  515.     toggle ^= 0x0800;
  516.     return (res ^ toggle);
  517. }
  518.  
  519. static WRITE_HANDLER( thndrx2_eeprom_w )
  520. {
  521.     static int last;
  522.  
  523.     if ((data & 0x00ff0000) == 0)
  524.     {
  525.         /* bit 0 is data */
  526.         /* bit 1 is cs (active low) */
  527.         /* bit 2 is clock (active high) */
  528.         EEPROM_write_bit(data & 0x01);
  529.         EEPROM_set_cs_line((data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
  530.         EEPROM_set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE);
  531.  
  532.         /* bit 5 triggers IRQ on sound cpu */
  533.         if (last == 0 && (data & 0x20) != 0)
  534.             cpu_cause_interrupt(1,0xff);
  535.         last = data & 0x20;
  536.  
  537.         /* bit 6 = enable char ROM reading through the video RAM */
  538.         K052109_set_RMRD_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
  539.     }
  540. }
  541.  
  542.  
  543.  
  544. static struct MemoryReadAddress mia_readmem[] =
  545. {
  546.     { 0x000000, 0x03ffff, MRA_ROM },
  547.     { 0x040000, 0x043fff, MRA_BANK3 },    /* main RAM */
  548.     { 0x060000, 0x063fff, MRA_BANK1 },    /* main RAM */
  549.     { 0x080000, 0x080fff, paletteram_word_r },
  550.     { 0x0a0000, 0x0a0001, input_port_0_r },
  551.     { 0x0a0002, 0x0a0003, input_port_1_r },
  552.     { 0x0a0004, 0x0a0005, input_port_2_r },
  553.     { 0x0a0010, 0x0a0011, input_port_3_r },
  554.     { 0x0a0012, 0x0a0013, input_port_4_r },
  555.     { 0x0a0018, 0x0a0019, input_port_5_r },
  556.     { 0x100000, 0x107fff, K052109_word_noA12_r },
  557.     { 0x140000, 0x140007, K051937_word_r },
  558.     { 0x140400, 0x1407ff, K051960_word_r },
  559.     { -1 }    /* end of table */
  560. };
  561.  
  562. static struct MemoryWriteAddress mia_writemem[] =
  563. {
  564.     { 0x000000, 0x03ffff, MWA_ROM },
  565.     { 0x040000, 0x043fff, MWA_BANK3 },    /* main RAM */
  566.     { 0x060000, 0x063fff, MWA_BANK1 },    /* main RAM */
  567.     { 0x080000, 0x080fff, tmnt_paletteram_w, &paletteram },
  568.     { 0x0a0000, 0x0a0001, tmnt_0a0000_w },
  569.     { 0x0a0008, 0x0a0009, tmnt_sound_command_w },
  570.     { 0x0a0010, 0x0a0011, watchdog_reset_w },
  571.     { 0x100000, 0x107fff, K052109_word_noA12_w },
  572.     { 0x140000, 0x140007, K051937_word_w },
  573.     { 0x140400, 0x1407ff, K051960_word_w },
  574. //    { 0x10e800, 0x10e801, MWA_NOP }, ???
  575. #if 0
  576.     { 0x0c0000, 0x0c0001, tmnt_priority_w },
  577. #endif
  578.     { -1 }    /* end of table */
  579. };
  580.  
  581. static struct MemoryReadAddress tmnt_readmem[] =
  582. {
  583.     { 0x000000, 0x05ffff, MRA_ROM },
  584.     { 0x060000, 0x063fff, MRA_BANK1 },    /* main RAM */
  585.     { 0x080000, 0x080fff, paletteram_word_r },
  586.     { 0x0a0000, 0x0a0001, input_port_0_r },
  587.     { 0x0a0002, 0x0a0003, input_port_1_r },
  588.     { 0x0a0004, 0x0a0005, input_port_2_r },
  589.     { 0x0a0006, 0x0a0007, input_port_3_r },
  590.     { 0x0a0010, 0x0a0011, input_port_4_r },
  591.     { 0x0a0012, 0x0a0013, input_port_5_r },
  592.     { 0x0a0014, 0x0a0015, input_port_6_r },
  593.     { 0x0a0018, 0x0a0019, input_port_7_r },
  594.     { 0x100000, 0x107fff, K052109_word_noA12_r },
  595.     { 0x140000, 0x140007, K051937_word_r },
  596.     { 0x140400, 0x1407ff, K051960_word_r },
  597.     { -1 }    /* end of table */
  598. };
  599.  
  600. static struct MemoryWriteAddress tmnt_writemem[] =
  601. {
  602.     { 0x000000, 0x05ffff, MWA_ROM },
  603.     { 0x060000, 0x063fff, MWA_BANK1 },    /* main RAM */
  604.     { 0x080000, 0x080fff, tmnt_paletteram_w, &paletteram },
  605.     { 0x0a0000, 0x0a0001, tmnt_0a0000_w },
  606.     { 0x0a0008, 0x0a0009, tmnt_sound_command_w },
  607.     { 0x0a0010, 0x0a0011, watchdog_reset_w },
  608.     { 0x0c0000, 0x0c0001, tmnt_priority_w },
  609.     { 0x100000, 0x107fff, K052109_word_noA12_w },
  610. //    { 0x10e800, 0x10e801, MWA_NOP }, ???
  611.     { 0x140000, 0x140007, K051937_word_w },
  612.     { 0x140400, 0x1407ff, K051960_word_w },
  613.     { -1 }    /* end of table */
  614. };
  615.  
  616. static struct MemoryReadAddress punkshot_readmem[] =
  617. {
  618.     { 0x000000, 0x03ffff, MRA_ROM },
  619.     { 0x080000, 0x083fff, MRA_BANK1 },    /* main RAM */
  620.     { 0x090000, 0x090fff, paletteram_word_r },
  621.     { 0x0a0000, 0x0a0001, input_port_0_r },
  622.     { 0x0a0002, 0x0a0003, input_port_1_r },
  623.     { 0x0a0004, 0x0a0005, input_port_3_r },
  624.     { 0x0a0006, 0x0a0007, input_port_2_r },
  625.     { 0x0a0040, 0x0a0043, punkshot_sound_r },    /* K053260 */
  626.     { 0x100000, 0x107fff, K052109_word_noA12_r },
  627.     { 0x110000, 0x110007, K051937_word_r },
  628.     { 0x110400, 0x1107ff, K051960_word_r },
  629.     { 0xfffffc, 0xffffff, punkshot_kludge_r },
  630.     { -1 }    /* end of table */
  631. };
  632.  
  633. static struct MemoryWriteAddress punkshot_writemem[] =
  634. {
  635.     { 0x000000, 0x03ffff, MWA_ROM },
  636.     { 0x080000, 0x083fff, MWA_BANK1 },    /* main RAM */
  637.     { 0x090000, 0x090fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
  638.     { 0x0a0020, 0x0a0021, punkshot_0a0020_w },
  639.     { 0x0a0040, 0x0a0041, K053260_w },
  640.     { 0x0a0060, 0x0a007f, K053251_halfword_w },
  641.     { 0x0a0080, 0x0a0081, watchdog_reset_w },
  642.     { 0x100000, 0x107fff, K052109_word_noA12_w },
  643.     { 0x110000, 0x110007, K051937_word_w },
  644.     { 0x110400, 0x1107ff, K051960_word_w },
  645.     { -1 }    /* end of table */
  646. };
  647.  
  648. static struct MemoryReadAddress lgtnfght_readmem[] =
  649. {
  650.     { 0x000000, 0x03ffff, MRA_ROM },
  651.     { 0x080000, 0x080fff, paletteram_word_r },
  652.     { 0x090000, 0x093fff, MRA_BANK1 },    /* main RAM */
  653.     { 0x0a0000, 0x0a0001, input_port_0_r },
  654.     { 0x0a0002, 0x0a0003, input_port_1_r },
  655.     { 0x0a0004, 0x0a0005, input_port_2_r },
  656.     { 0x0a0006, 0x0a0007, input_port_3_r },
  657.     { 0x0a0008, 0x0a0009, input_port_4_r },
  658.     { 0x0a0010, 0x0a0011, input_port_5_r },
  659.     { 0x0a0020, 0x0a0023, punkshot_sound_r },    /* K053260 */
  660.     { 0x0b0000, 0x0b3fff, K053245_scattered_word_r },
  661.     { 0x0c0000, 0x0c001f, K053244_word_noA1_r },
  662.     { 0x100000, 0x107fff, K052109_word_noA12_r },
  663.     { -1 }    /* end of table */
  664. };
  665.  
  666. static struct MemoryWriteAddress lgtnfght_writemem[] =
  667. {
  668.     { 0x000000, 0x03ffff, MWA_ROM },
  669.     { 0x080000, 0x080fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
  670.     { 0x090000, 0x093fff, MWA_BANK1 },    /* main RAM */
  671.     { 0x0a0018, 0x0a0019, lgtnfght_0a0018_w },
  672.     { 0x0a0020, 0x0a0021, K053260_w },
  673.     { 0x0a0028, 0x0a0029, watchdog_reset_w },
  674.     { 0x0b0000, 0x0b3fff, K053245_scattered_word_w, &spriteram },
  675.     { 0x0c0000, 0x0c001f, K053244_word_noA1_w },
  676.     { 0x0e0000, 0x0e001f, K053251_halfword_w },
  677.     { 0x100000, 0x107fff, K052109_word_noA12_w },
  678.     { -1 }    /* end of table */
  679. };
  680.  
  681.  
  682. static WRITE_HANDLER( ssriders_soundkludge_w )
  683. {
  684.     /* I think this is more than just a trigger */
  685.     cpu_cause_interrupt(1,0xff);
  686. }
  687.  
  688. static struct MemoryReadAddress detatwin_readmem[] =
  689. {
  690.     { 0x000000, 0x07ffff, MRA_ROM },
  691.     { 0x180000, 0x183fff, K052109_word_r },
  692.     { 0x204000, 0x207fff, MRA_BANK1 },    /* main RAM */
  693.     { 0x300000, 0x303fff, K053245_scattered_word_r },
  694.     { 0x400000, 0x400fff, paletteram_word_r },
  695.     { 0x500000, 0x50003f, K054000_halfword_r },
  696.     { 0x680000, 0x68001f, K053244_word_noA1_r },
  697.     { 0x700000, 0x700001, input_port_0_r },
  698.     { 0x700002, 0x700003, input_port_1_r },
  699.     { 0x700004, 0x700005, detatwin_coin_r },
  700.     { 0x700006, 0x700007, detatwin_eeprom_r },
  701.     { 0x780600, 0x780603, detatwin_sound_r },    /* K053260 */
  702.     { -1 }    /* end of table */
  703. };
  704.  
  705. static struct MemoryWriteAddress detatwin_writemem[] =
  706. {
  707.     { 0x000000, 0x07ffff, MWA_ROM },
  708.     { 0x180000, 0x183fff, K052109_word_w },
  709.     { 0x204000, 0x207fff, MWA_BANK1 },    /* main RAM */
  710.     { 0x300000, 0x303fff, K053245_scattered_word_w, &spriteram },
  711.     { 0x500000, 0x50003f, K054000_halfword_w },
  712.     { 0x400000, 0x400fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
  713.     { 0x680000, 0x68001f, K053244_word_noA1_w },
  714.     { 0x700200, 0x700201, ssriders_eeprom_w },
  715.     { 0x700400, 0x700401, watchdog_reset_w },
  716.     { 0x700300, 0x700301, detatwin_700300_w },
  717.     { 0x780600, 0x780601, K053260_w },
  718.     { 0x780604, 0x780605, ssriders_soundkludge_w },
  719.     { 0x780700, 0x78071f, K053251_halfword_w },
  720.     { -1 }    /* end of table */
  721. };
  722.  
  723.  
  724. static READ_HANDLER( ball_r )
  725. {
  726.     return 0x11;
  727. }
  728.  
  729. static struct MemoryReadAddress glfgreat_readmem[] =
  730. {
  731.     { 0x000000, 0x03ffff, MRA_ROM },
  732.     { 0x100000, 0x103fff, MRA_BANK1 },    /* main RAM */
  733.     { 0x104000, 0x107fff, K053245_scattered_word_r },
  734.     { 0x108000, 0x108fff, paletteram_word_r },
  735.     { 0x10c000, 0x10cfff, MRA_BANK2 },    /* 053936? */
  736.     { 0x114000, 0x11401f, K053244_halfword_r },
  737.     { 0x120000, 0x120001, input_port_0_r },
  738.     { 0x120002, 0x120003, input_port_1_r },
  739.     { 0x120004, 0x120005, input_port_3_r },
  740.     { 0x120006, 0x120007, input_port_2_r },
  741.     { 0x121000, 0x121001, ball_r },    /* protection? returning 0, every shot is a "water" */
  742.     { 0x125000, 0x125003, glfgreat_sound_r },    /* K053260 */
  743.     { 0x200000, 0x207fff, K052109_word_noA12_r },
  744.     { -1 }    /* end of table */
  745. };
  746.  
  747. static struct MemoryWriteAddress glfgreat_writemem[] =
  748. {
  749.     { 0x000000, 0x03ffff, MWA_ROM },
  750.     { 0x100000, 0x103fff, MWA_BANK1 },    /* main RAM */
  751.     { 0x104000, 0x107fff, K053245_scattered_word_w, &spriteram },
  752.     { 0x108000, 0x108fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
  753.     { 0x10c000, 0x10cfff, MWA_BANK2 },    /* 053936? */
  754.     { 0x110000, 0x11001f, K053244_word_noA1_w },    /* duplicate! */
  755.     { 0x114000, 0x11401f, K053244_halfword_w },        /* duplicate! */
  756.     { 0x118000, 0x11801f, MWA_NOP },    /* 053936 control? */
  757.     { 0x11c000, 0x11c01f, K053251_halfword_swap_w },
  758.     { 0x122000, 0x122001, glfgreat_122000_w },
  759.     { 0x124000, 0x124001, watchdog_reset_w },
  760.     { 0x125000, 0x125003, glfgreat_sound_w },    /* K053260 */
  761.     { 0x200000, 0x207fff, K052109_word_noA12_w },
  762.     { -1 }    /* end of table */
  763. };
  764.  
  765.  
  766. static struct MemoryReadAddress tmnt2_readmem[] =
  767. {
  768.     { 0x000000, 0x07ffff, MRA_ROM },
  769.     { 0x104000, 0x107fff, MRA_BANK1 },    /* main RAM */
  770.     { 0x140000, 0x140fff, paletteram_word_r },
  771.     { 0x180000, 0x183fff, K053245_scattered_word_r },
  772.     { 0x1c0000, 0x1c0001, input_port_0_r },
  773.     { 0x1c0002, 0x1c0003, input_port_1_r },
  774.     { 0x1c0004, 0x1c0005, input_port_4_r },
  775.     { 0x1c0006, 0x1c0007, input_port_5_r },
  776.     { 0x1c0100, 0x1c0101, input_port_2_r },
  777.     { 0x1c0102, 0x1c0103, ssriders_eeprom_r },
  778.     { 0x1c0400, 0x1c0401, watchdog_reset_r },
  779.     { 0x1c0500, 0x1c057f, MRA_BANK3 },    /* TMNT2 only (1J); unknown */
  780. //    { 0x1c0800, 0x1c0801, ssriders_kludge_r },    /* protection device */
  781.     { 0x5a0000, 0x5a001f, K053244_word_noA1_r },
  782.     { 0x5c0600, 0x5c0603, tmnt2_sound_r },    /* K053260 */
  783.     { 0x600000, 0x603fff, K052109_word_r },
  784.     { -1 }    /* end of table */
  785. };
  786.  
  787. static unsigned char *tmnt2_1c0800,*sunset_104000;
  788.  
  789. WRITE_HANDLER( tmnt2_1c0800_w )
  790. {
  791.     COMBINE_WORD_MEM( &tmnt2_1c0800[offset], data );
  792.     if ( offset == 0x0010 && ( ( READ_WORD( &tmnt2_1c0800[0x10] ) & 0xff00 ) == 0x8200 ) )
  793.     {
  794.         unsigned int CellSrc;
  795.         unsigned int CellVar;
  796.         unsigned char *src;
  797.         int dst;
  798.         int x,y;
  799.  
  800.         CellVar = ( READ_WORD( &tmnt2_1c0800[0x08] ) | ( READ_WORD( &tmnt2_1c0800[0x0A] ) << 16 ) );
  801.         dst = ( READ_WORD( &tmnt2_1c0800[0x04] ) | ( READ_WORD( &tmnt2_1c0800[0x06] ) << 16 ) );
  802.         CellSrc = ( READ_WORD( &tmnt2_1c0800[0x00] ) | ( READ_WORD( &tmnt2_1c0800[0x02] ) << 16 ) );
  803. //        if ( CellDest >= 0x180000 && CellDest < 0x183fe0 ) {
  804.         CellVar -= 0x104000;
  805.         src = &memory_region(REGION_CPU1)[CellSrc];
  806.  
  807.         cpu_writemem24bew_word(dst+0x00,0x8000 | ((READ_WORD(src+2) & 0xfc00) >> 2));    /* size, flip xy */
  808.         cpu_writemem24bew_word(dst+0x04,READ_WORD(src+0));    /* code */
  809.         cpu_writemem24bew_word(dst+0x18,(READ_WORD(src+2) & 0x3ff) ^        /* color, mirror, priority */
  810.                 (READ_WORD( &sunset_104000[CellVar + 0x00] ) & 0x0060));
  811.  
  812.         /* base color modifier */
  813.         /* TODO: this is wrong, e.g. it breaks the explosions when you kill an */
  814.         /* enemy, or surfs in the sewer level (must be blue for all enemies). */
  815.         /* It fixes the enemies, though, they are not all purple when you throw them around. */
  816.         /* Also, the bosses don't blink when they are about to die - don't know */
  817.         /* if this is correct or not. */
  818. //        if (READ_WORD( &sunset_104000[CellVar + 0x2a] ) & 0x001f)
  819. //            cpu_writemem24bew_word(dst+0x18,(cpu_readmem24bew_word(dst+0x18) & 0xffe0) |
  820. //                    (READ_WORD( &sunset_104000[CellVar + 0x2a] ) & 0x001f));
  821.  
  822.         x = READ_WORD(src+4);
  823.         if (READ_WORD( &sunset_104000[CellVar + 0x00] ) & 0x4000)
  824.         {
  825.             /* flip x */
  826.             cpu_writemem24bew_word(dst+0x00,cpu_readmem24bew_word(dst+0x00) ^ 0x1000);
  827.             x = -x;
  828.         }
  829.         x += READ_WORD( &sunset_104000[CellVar + 0x0C] );
  830.         cpu_writemem24bew_word(dst+0x0c,x);
  831.         y = READ_WORD(src+6);
  832.         y += READ_WORD( &sunset_104000[CellVar + 0x0E] );
  833.         /* don't do second offset for shadows */
  834.         if ((READ_WORD(&tmnt2_1c0800[0x10]) & 0x00ff) != 0x01)
  835.             y += READ_WORD( &sunset_104000[CellVar + 0x10] );
  836.         cpu_writemem24bew_word(dst+0x08,y);
  837. #if 0
  838. logerror("copy command %04x sprite %08x data %08x: %04x%04x %04x%04x  modifiers %08x:%04x%04x %04x%04x %04x%04x %04x%04x %04x%04x %04x%04x %04x%04x %04x%04x %04x%04x %04x%04x %04x%04x %04x%04x\n",
  839.     READ_WORD( &tmnt2_1c0800[0x10] ),
  840.     CellDest,CellSrc,
  841.     READ_WORD(src+0),READ_WORD(src+2),READ_WORD(src+4),READ_WORD(src+6),
  842.     CellVar,
  843.     READ_WORD( &sunset_104000[CellVar + 0x00]),
  844.     READ_WORD( &sunset_104000[CellVar + 0x02]),
  845.     READ_WORD( &sunset_104000[CellVar + 0x04]),
  846.     READ_WORD( &sunset_104000[CellVar + 0x06]),
  847.     READ_WORD( &sunset_104000[CellVar + 0x08]),
  848.     READ_WORD( &sunset_104000[CellVar + 0x0a]),
  849.     READ_WORD( &sunset_104000[CellVar + 0x0c]),
  850.     READ_WORD( &sunset_104000[CellVar + 0x0e]),
  851.     READ_WORD( &sunset_104000[CellVar + 0x10]),
  852.     READ_WORD( &sunset_104000[CellVar + 0x12]),
  853.     READ_WORD( &sunset_104000[CellVar + 0x14]),
  854.     READ_WORD( &sunset_104000[CellVar + 0x16]),
  855.     READ_WORD( &sunset_104000[CellVar + 0x18]),
  856.     READ_WORD( &sunset_104000[CellVar + 0x1a]),
  857.     READ_WORD( &sunset_104000[CellVar + 0x1c]),
  858.     READ_WORD( &sunset_104000[CellVar + 0x1e]),
  859.     READ_WORD( &sunset_104000[CellVar + 0x20]),
  860.     READ_WORD( &sunset_104000[CellVar + 0x22]),
  861.     READ_WORD( &sunset_104000[CellVar + 0x24]),
  862.     READ_WORD( &sunset_104000[CellVar + 0x26]),
  863.     READ_WORD( &sunset_104000[CellVar + 0x28]),
  864.     READ_WORD( &sunset_104000[CellVar + 0x2a]),
  865.     READ_WORD( &sunset_104000[CellVar + 0x2c]),
  866.     READ_WORD( &sunset_104000[CellVar + 0x2e])
  867.     );
  868. #endif
  869. //        }
  870.     }
  871. }
  872.  
  873. static struct MemoryWriteAddress tmnt2_writemem[] =
  874. {
  875.     { 0x000000, 0x07ffff, MWA_ROM },
  876.     { 0x104000, 0x107fff, MWA_BANK1, &sunset_104000 },    /* main RAM */
  877.     { 0x140000, 0x140fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
  878.     { 0x180000, 0x183fff, K053245_scattered_word_w, &spriteram },
  879.     { 0x1c0200, 0x1c0201, ssriders_eeprom_w },
  880.     { 0x1c0300, 0x1c0301, ssriders_1c0300_w },
  881.     { 0x1c0400, 0x1c0401, watchdog_reset_w },
  882.     { 0x1c0500, 0x1c057f, MWA_BANK3 },    /* unknown: TMNT2 only (1J) */
  883.     { 0x1c0800, 0x1c081f, tmnt2_1c0800_w, &tmnt2_1c0800 },    /* protection device */
  884.     { 0x5a0000, 0x5a001f, K053244_word_noA1_w },
  885.     { 0x5c0600, 0x5c0601, K053260_w },
  886.     { 0x5c0604, 0x5c0605, ssriders_soundkludge_w },
  887.     { 0x5c0700, 0x5c071f, K053251_halfword_w },
  888.     { 0x600000, 0x603fff, K052109_word_w },
  889.     { -1 }    /* end of table */
  890. };
  891.  
  892.  
  893. static struct MemoryReadAddress ssriders_readmem[] =
  894. {
  895.     { 0x000000, 0x0bffff, MRA_ROM },
  896.     { 0x104000, 0x107fff, MRA_BANK1 },    /* main RAM */
  897.     { 0x140000, 0x140fff, paletteram_word_r },
  898.     { 0x180000, 0x183fff, K053245_scattered_word_r },
  899.     { 0x1c0000, 0x1c0001, input_port_0_r },
  900.     { 0x1c0002, 0x1c0003, input_port_1_r },
  901.     { 0x1c0004, 0x1c0005, input_port_4_r },
  902.     { 0x1c0006, 0x1c0007, input_port_5_r },
  903.     { 0x1c0100, 0x1c0101, input_port_2_r },
  904.     { 0x1c0102, 0x1c0103, ssriders_eeprom_r },
  905.     { 0x1c0400, 0x1c0401, watchdog_reset_r },
  906.     { 0x1c0500, 0x1c057f, MRA_BANK3 },    /* TMNT2 only (1J); unknown */
  907.     { 0x1c0800, 0x1c0801, ssriders_kludge_r },    /* protection device */
  908.     { 0x5a0000, 0x5a001f, K053244_word_noA1_r },
  909.     { 0x5c0600, 0x5c0603, punkshot_sound_r },    /* K053260 */
  910.     { 0x600000, 0x603fff, K052109_word_r },
  911.     { -1 }    /* end of table */
  912. };
  913.  
  914. static struct MemoryWriteAddress ssriders_writemem[] =
  915. {
  916.     { 0x000000, 0x0bffff, MWA_ROM },
  917.     { 0x104000, 0x107fff, MWA_BANK1 },    /* main RAM */
  918.     { 0x140000, 0x140fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
  919.     { 0x180000, 0x183fff, K053245_scattered_word_w, &spriteram },
  920.     { 0x1c0200, 0x1c0201, ssriders_eeprom_w },
  921.     { 0x1c0300, 0x1c0301, ssriders_1c0300_w },
  922.     { 0x1c0400, 0x1c0401, watchdog_reset_w },
  923.     { 0x1c0500, 0x1c057f, MWA_BANK3 },    /* TMNT2 only (1J); unknown */
  924. //    { 0x1c0800, 0x1c081f,  },    /* protection device */
  925.     { 0x5a0000, 0x5a001f, K053244_word_noA1_w },
  926.     { 0x5c0600, 0x5c0601, K053260_w },
  927.     { 0x5c0604, 0x5c0605, ssriders_soundkludge_w },
  928.     { 0x5c0700, 0x5c071f, K053251_halfword_w },
  929.     { 0x600000, 0x603fff, K052109_word_w },
  930.     { -1 }    /* end of table */
  931. };
  932.  
  933.  
  934. static struct MemoryReadAddress thndrx2_readmem[] =
  935. {
  936.     { 0x000000, 0x03ffff, MRA_ROM },
  937.     { 0x100000, 0x103fff, MRA_BANK1 },    /* main RAM */
  938.     { 0x200000, 0x200fff, paletteram_word_r },
  939.     { 0x400000, 0x400003, punkshot_sound_r },    /* K053260 */
  940.     { 0x500000, 0x50003f, K054000_halfword_r },
  941.     { 0x500200, 0x500201, thndrx2_in0_r },
  942.     { 0x500202, 0x500203, thndrx2_eeprom_r },
  943.     { 0x600000, 0x607fff, K052109_word_noA12_r },
  944.     { 0x700000, 0x700007, K051937_word_r },
  945.     { 0x700400, 0x7007ff, K051960_word_r },
  946.     { -1 }    /* end of table */
  947. };
  948.  
  949. static struct MemoryWriteAddress thndrx2_writemem[] =
  950. {
  951.     { 0x000000, 0x03ffff, MWA_ROM },
  952.     { 0x100000, 0x103fff, MWA_BANK1 },    /* main RAM */
  953.     { 0x200000, 0x200fff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
  954.     { 0x300000, 0x30001f, K053251_halfword_w },
  955.     { 0x400000, 0x400001, K053260_w },
  956.     { 0x500000, 0x50003f, K054000_halfword_w },
  957.     { 0x500100, 0x500101, thndrx2_eeprom_w },
  958.     { 0x500300, 0x500301, MWA_NOP },    /* watchdog reset? irq enable? */
  959.     { 0x600000, 0x607fff, K052109_word_noA12_w },
  960.     { 0x700000, 0x700007, K051937_word_w },
  961.     { 0x700400, 0x7007ff, K051960_word_w },
  962.     { -1 }    /* end of table */
  963. };
  964.  
  965.  
  966.  
  967. static struct MemoryReadAddress mia_s_readmem[] =
  968. {
  969.     { 0x0000, 0x7fff, MRA_ROM },
  970.     { 0x8000, 0x87ff, MRA_RAM },
  971.     { 0xa000, 0xa000, soundlatch_r },
  972.     { 0xb000, 0xb00d, K007232_read_port_0_r },
  973.     { 0xc001, 0xc001, YM2151_status_port_0_r },
  974.     { -1 }    /* end of table */
  975. };
  976.  
  977. static struct MemoryWriteAddress mia_s_writemem[] =
  978. {
  979.     { 0x0000, 0x7fff, MWA_ROM },
  980.     { 0x8000, 0x87ff, MWA_RAM },
  981.     { 0xb000, 0xb00d, K007232_write_port_0_w },
  982.     { 0xc000, 0xc000, YM2151_register_port_0_w },
  983.     { 0xc001, 0xc001, YM2151_data_port_0_w },
  984.     { -1 }    /* end of table */
  985. };
  986.  
  987. static struct MemoryReadAddress tmnt_s_readmem[] =
  988. {
  989.     { 0x0000, 0x7fff, MRA_ROM },
  990.     { 0x8000, 0x87ff, MRA_RAM },
  991.     { 0x9000, 0x9000, tmnt_sres_r },    /* title music & UPD7759C reset */
  992.     { 0xa000, 0xa000, soundlatch_r },
  993.     { 0xb000, 0xb00d, K007232_read_port_0_r },
  994.     { 0xc001, 0xc001, YM2151_status_port_0_r },
  995.     { 0xf000, 0xf000, UPD7759_0_busy_r },
  996.     { -1 }    /* end of table */
  997. };
  998.  
  999. static struct MemoryWriteAddress tmnt_s_writemem[] =
  1000. {
  1001.     { 0x0000, 0x7fff, MWA_ROM },
  1002.     { 0x8000, 0x87ff, MWA_RAM },
  1003.     { 0x9000, 0x9000, tmnt_sres_w },    /* title music & UPD7759C reset */
  1004.     { 0xb000, 0xb00d, K007232_write_port_0_w  },
  1005.     { 0xc000, 0xc000, YM2151_register_port_0_w },
  1006.     { 0xc001, 0xc001, YM2151_data_port_0_w },
  1007.     { 0xd000, 0xd000, UPD7759_0_message_w },
  1008.     { 0xe000, 0xe000, UPD7759_0_start_w },
  1009.     { -1 }    /* end of table */
  1010. };
  1011.  
  1012. static struct MemoryReadAddress punkshot_s_readmem[] =
  1013. {
  1014.     { 0x0000, 0x7fff, MRA_ROM },
  1015.     { 0xf000, 0xf7ff, MRA_RAM },
  1016.     { 0xf801, 0xf801, YM2151_status_port_0_r },
  1017.     { 0xfc00, 0xfc2f, K053260_r },
  1018.     { -1 }    /* end of table */
  1019. };
  1020.  
  1021. static struct MemoryWriteAddress punkshot_s_writemem[] =
  1022. {
  1023.     { 0x0000, 0x7fff, MWA_ROM },
  1024.     { 0xf000, 0xf7ff, MWA_RAM },
  1025.     { 0xf800, 0xf800, YM2151_register_port_0_w },
  1026.     { 0xf801, 0xf801, YM2151_data_port_0_w },
  1027.     { 0xfa00, 0xfa00, sound_arm_nmi_w },
  1028.     { 0xfc00, 0xfc2f, K053260_w },
  1029.     { -1 }    /* end of table */
  1030. };
  1031.  
  1032. static struct MemoryReadAddress lgtnfght_s_readmem[] =
  1033. {
  1034.     { 0x0000, 0x7fff, MRA_ROM },
  1035.     { 0x8000, 0x87ff, MRA_RAM },
  1036.     { 0xa001, 0xa001, YM2151_status_port_0_r },
  1037.     { 0xc000, 0xc02f, K053260_r },
  1038.     { -1 }    /* end of table */
  1039. };
  1040.  
  1041. static struct MemoryWriteAddress lgtnfght_s_writemem[] =
  1042. {
  1043.     { 0x0000, 0x7fff, MWA_ROM },
  1044.     { 0x8000, 0x87ff, MWA_RAM },
  1045.     { 0xa000, 0xa000, YM2151_register_port_0_w },
  1046.     { 0xa001, 0xa001, YM2151_data_port_0_w },
  1047.     { 0xc000, 0xc02f, K053260_w },
  1048.     { -1 }    /* end of table */
  1049. };
  1050.  
  1051. static struct MemoryReadAddress glfgreat_s_readmem[] =
  1052. {
  1053.     { 0x0000, 0x7fff, MRA_ROM },
  1054.     { 0xf000, 0xf7ff, MRA_RAM },
  1055.     { 0xf800, 0xf82f, K053260_r },
  1056.     { -1 }    /* end of table */
  1057. };
  1058.  
  1059. static struct MemoryWriteAddress glfgreat_s_writemem[] =
  1060. {
  1061.     { 0x0000, 0x7fff, MWA_ROM },
  1062.     { 0xf000, 0xf7ff, MWA_RAM },
  1063.     { 0xf800, 0xf82f, K053260_w },
  1064.     { 0xfa00, 0xfa00, sound_arm_nmi_w },
  1065.     { -1 }    /* end of table */
  1066. };
  1067.  
  1068. static struct MemoryReadAddress ssriders_s_readmem[] =
  1069. {
  1070.     { 0x0000, 0xefff, MRA_ROM },
  1071.     { 0xf000, 0xf7ff, MRA_RAM },
  1072.     { 0xf801, 0xf801, YM2151_status_port_0_r },
  1073.     { 0xfa00, 0xfa2f, K053260_r },
  1074.     { -1 }    /* end of table */
  1075. };
  1076.  
  1077. static struct MemoryWriteAddress ssriders_s_writemem[] =
  1078. {
  1079.     { 0x0000, 0xefff, MWA_ROM },
  1080.     { 0xf000, 0xf7ff, MWA_RAM },
  1081.     { 0xf800, 0xf800, YM2151_register_port_0_w },
  1082.     { 0xf801, 0xf801, YM2151_data_port_0_w },
  1083.     { 0xfa00, 0xfa2f, K053260_w },
  1084.     { 0xfc00, 0xfc00, sound_arm_nmi_w },
  1085.     { -1 }    /* end of table */
  1086. };
  1087.  
  1088. static struct MemoryReadAddress thndrx2_s_readmem[] =
  1089. {
  1090.     { 0x0000, 0xefff, MRA_ROM },
  1091.     { 0xf000, 0xf7ff, MRA_RAM },
  1092.     { 0xf801, 0xf801, YM2151_status_port_0_r },
  1093.     { 0xfc00, 0xfc2f, K053260_r },
  1094.     { -1 }    /* end of table */
  1095. };
  1096.  
  1097. static struct MemoryWriteAddress thndrx2_s_writemem[] =
  1098. {
  1099.     { 0x0000, 0xefff, MWA_ROM },
  1100.     { 0xf000, 0xf7ff, MWA_RAM },
  1101.     { 0xf800, 0xf800, YM2151_register_port_0_w },
  1102.     { 0xf801, 0xf801, YM2151_data_port_0_w },
  1103.     { 0xf811, 0xf811, YM2151_data_port_0_w },    /* mirror */
  1104.     { 0xfa00, 0xfa00, sound_arm_nmi_w },
  1105.     { 0xfc00, 0xfc2f, K053260_w },
  1106.     { -1 }    /* end of table */
  1107. };
  1108.  
  1109.  
  1110.  
  1111. INPUT_PORTS_START( mia )
  1112.     PORT_START      /* COINS */
  1113.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1114.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1115.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1116.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  1117.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  1118.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1119.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
  1120.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1121.  
  1122.     PORT_START      /* PLAYER 1 */
  1123.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 | IPF_8WAY )
  1124.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 | IPF_8WAY )
  1125.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 | IPF_8WAY )
  1126.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 | IPF_8WAY )
  1127.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1128.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1129.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  1130.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1131.  
  1132.     PORT_START      /* PLAYER 2 */
  1133.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 | IPF_8WAY )
  1134.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 | IPF_8WAY )
  1135.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 | IPF_8WAY )
  1136.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 | IPF_8WAY )
  1137.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1138.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1139.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  1140.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1141.  
  1142.     PORT_START    /* DSW1 */
  1143.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  1144.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  1145.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  1146.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  1147.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  1148.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  1149.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  1150.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  1151.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  1152.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  1153.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  1154.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  1155.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  1156.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  1157.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  1158.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  1159.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  1160.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  1161.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  1162.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  1163.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  1164.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  1165.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  1166.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  1167.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  1168.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  1169.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  1170.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  1171.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  1172.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  1173.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  1174.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  1175.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  1176. //    PORT_DIPSETTING(    0x00, "Invalid" )
  1177.  
  1178.     PORT_START    /* DSW2 */
  1179.     PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
  1180.     PORT_DIPSETTING(    0x03, "2" )
  1181.     PORT_DIPSETTING(    0x02, "3" )
  1182.     PORT_DIPSETTING(    0x01, "5" )
  1183.     PORT_DIPSETTING(    0x00, "7" )
  1184.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  1185.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  1186.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1187.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) )
  1188.     PORT_DIPSETTING(    0x18, "30000 80000" )
  1189.     PORT_DIPSETTING(    0x10, "50000 100000" )
  1190.     PORT_DIPSETTING(    0x08, "50000" )
  1191.     PORT_DIPSETTING(    0x00, "100000" )
  1192.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  1193.     PORT_DIPSETTING(    0x60, "Easy" )
  1194.     PORT_DIPSETTING(    0x40, "Normal" )
  1195.     PORT_DIPSETTING(    0x20, "Difficult" )
  1196.     PORT_DIPSETTING(    0x00, "Very Difficult" )
  1197.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  1198.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1199.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1200.  
  1201.     PORT_START    /* DSW3 */
  1202.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  1203.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1204.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1205.     PORT_DIPNAME( 0x02, 0x02, "Character Test" )
  1206.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1207.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1208.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  1209.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1210.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1211.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1212.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1213. INPUT_PORTS_END
  1214.  
  1215. INPUT_PORTS_START( tmnt )
  1216.     PORT_START      /* COINS */
  1217.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1218.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1219.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  1220.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
  1221.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1222.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 )
  1223.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 )
  1224.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 )
  1225.  
  1226.     PORT_START      /* PLAYER 1 */
  1227.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 | IPF_8WAY )
  1228.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 | IPF_8WAY )
  1229.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 | IPF_8WAY )
  1230.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 | IPF_8WAY )
  1231.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1232.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1233.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1234.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  1235.  
  1236.     PORT_START      /* PLAYER 2 */
  1237.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 | IPF_8WAY )
  1238.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 | IPF_8WAY )
  1239.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 | IPF_8WAY )
  1240.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 | IPF_8WAY )
  1241.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1242.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1243.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1244.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  1245.  
  1246.     PORT_START      /* PLAYER 3 */
  1247.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER3 | IPF_8WAY )
  1248.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER3 | IPF_8WAY )
  1249.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER3 | IPF_8WAY )
  1250.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER3 | IPF_8WAY )
  1251.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  1252.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  1253.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1254.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
  1255.  
  1256.     PORT_START    /* DSW1 */
  1257.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) )
  1258.     PORT_DIPSETTING(    0x00, DEF_STR( 5C_1C ) )
  1259.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  1260.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  1261.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  1262.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  1263.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  1264.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  1265.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  1266.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  1267.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  1268.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  1269.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  1270.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  1271.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  1272.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  1273.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  1274.  
  1275.     PORT_START    /* DSW2 */
  1276.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  1277.     PORT_DIPSETTING(    0x03, "1" )
  1278.     PORT_DIPSETTING(    0x02, "2" )
  1279.     PORT_DIPSETTING(    0x01, "3" )
  1280.     PORT_DIPSETTING(    0x00, "5" )
  1281.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  1282.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  1283.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1284.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1285.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1286.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1287.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  1288.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1289.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1290.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  1291.     PORT_DIPSETTING(    0x60, "Easy" )
  1292.     PORT_DIPSETTING(    0x40, "Normal" )
  1293.     PORT_DIPSETTING(    0x20, "Difficult" )
  1294.     PORT_DIPSETTING(    0x00, "Very Difficult" )
  1295.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  1296.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1297.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1298.  
  1299.     PORT_START      /* PLAYER 4 */
  1300.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER4 | IPF_8WAY )
  1301.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER4 | IPF_8WAY )
  1302.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER4 | IPF_8WAY )
  1303.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER4 | IPF_8WAY )
  1304.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  1305.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  1306.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1307.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
  1308.  
  1309.     PORT_START    /* DSW3 */
  1310.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  1311.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1312.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1313.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  1314.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1315.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1316.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  1317.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1318.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1319.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1320.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1321. INPUT_PORTS_END
  1322.  
  1323. INPUT_PORTS_START( tmnt2p )
  1324.     PORT_START      /* COINS */
  1325.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1326.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1327.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1328.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1329.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )
  1330.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 )
  1331.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1332.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1333.  
  1334.     PORT_START      /* PLAYER 1 */
  1335.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 | IPF_8WAY )
  1336.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 | IPF_8WAY )
  1337.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 | IPF_8WAY )
  1338.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 | IPF_8WAY )
  1339.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1340.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1341.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1342.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  1343.  
  1344.     PORT_START      /* PLAYER 2 */
  1345.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 | IPF_8WAY )
  1346.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 | IPF_8WAY )
  1347.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 | IPF_8WAY )
  1348.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 | IPF_8WAY )
  1349.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1350.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1351.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1352.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  1353.  
  1354.     PORT_START      /* PLAYER 3 */
  1355. //    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER3 | IPF_8WAY )
  1356. //    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER3 | IPF_8WAY )
  1357. //    PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER3 | IPF_8WAY )
  1358. //    PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER3 | IPF_8WAY )
  1359. //    PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  1360. //    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  1361. //    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1362. //    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
  1363.  
  1364.     PORT_START    /* DSW1 */
  1365.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  1366.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  1367.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  1368.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  1369.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  1370.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  1371.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  1372.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  1373.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  1374.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  1375.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  1376.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  1377.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  1378.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  1379.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  1380.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  1381.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  1382.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  1383.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  1384.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  1385.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  1386.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  1387.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  1388.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  1389.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  1390.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  1391.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  1392.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  1393.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  1394.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  1395.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  1396.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  1397.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  1398. //    PORT_DIPSETTING(    0x00, "Invalid" )
  1399.  
  1400.     PORT_START    /* DSW2 */
  1401.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  1402.     PORT_DIPSETTING(    0x03, "1" )
  1403.     PORT_DIPSETTING(    0x02, "2" )
  1404.     PORT_DIPSETTING(    0x01, "3" )
  1405.     PORT_DIPSETTING(    0x00, "5" )
  1406.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  1407.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  1408.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1409.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1410.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1411.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1412.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  1413.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1414.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1415.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  1416.     PORT_DIPSETTING(    0x60, "Easy" )
  1417.     PORT_DIPSETTING(    0x40, "Normal" )
  1418.     PORT_DIPSETTING(    0x20, "Difficult" )
  1419.     PORT_DIPSETTING(    0x00, "Very Difficult" )
  1420.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  1421.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1422.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1423.  
  1424.     PORT_START      /* PLAYER 4 */
  1425. //    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER4 | IPF_8WAY )
  1426. //    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER4 | IPF_8WAY )
  1427. //    PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER4 | IPF_8WAY )
  1428. //    PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER4 | IPF_8WAY )
  1429. //    PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  1430. //    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  1431. //    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* button 3 - unused */
  1432. //    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
  1433.  
  1434.     PORT_START    /* DSW3 */
  1435.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  1436.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1437.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1438.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  1439.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1440.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1441.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  1442.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1443.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1444.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1445.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1446. INPUT_PORTS_END
  1447.  
  1448. INPUT_PORTS_START( punkshot )
  1449.     PORT_START    /* DSW1/DSW2 */
  1450.     PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) )
  1451.     PORT_DIPSETTING(      0x0000, DEF_STR( 5C_1C ) )
  1452.     PORT_DIPSETTING(      0x0002, DEF_STR( 4C_1C ) )
  1453.     PORT_DIPSETTING(      0x0005, DEF_STR( 3C_1C ) )
  1454.     PORT_DIPSETTING(      0x0008, DEF_STR( 2C_1C ) )
  1455.     PORT_DIPSETTING(      0x0004, DEF_STR( 3C_2C ) )
  1456.     PORT_DIPSETTING(      0x0001, DEF_STR( 4C_3C ) )
  1457.     PORT_DIPSETTING(      0x000f, DEF_STR( 1C_1C ) )
  1458.     PORT_DIPSETTING(      0x0003, DEF_STR( 3C_4C ) )
  1459.     PORT_DIPSETTING(      0x0007, DEF_STR( 2C_3C ) )
  1460.     PORT_DIPSETTING(      0x000e, DEF_STR( 1C_2C ) )
  1461.     PORT_DIPSETTING(      0x0006, DEF_STR( 2C_5C ) )
  1462.     PORT_DIPSETTING(      0x000d, DEF_STR( 1C_3C ) )
  1463.     PORT_DIPSETTING(      0x000c, DEF_STR( 1C_4C ) )
  1464.     PORT_DIPSETTING(      0x000b, DEF_STR( 1C_5C ) )
  1465.     PORT_DIPSETTING(      0x000a, DEF_STR( 1C_6C ) )
  1466.     PORT_DIPSETTING(      0x0009, DEF_STR( 1C_7C ) )
  1467.     PORT_DIPNAME( 0x0010, 0x0010, "Continue" )
  1468.     PORT_DIPSETTING(      0x0010, "Normal" )
  1469.     PORT_DIPSETTING(      0x0000, "1 Coin" )
  1470.     PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
  1471.     PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  1472.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1473.     PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
  1474.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1475.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1476.     PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
  1477.     PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  1478.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1479.     PORT_DIPNAME( 0x0300, 0x0300, "Energy" )
  1480.     PORT_DIPSETTING(      0x0300, "30" )
  1481.     PORT_DIPSETTING(      0x0200, "40" )
  1482.     PORT_DIPSETTING(      0x0100, "50" )
  1483.     PORT_DIPSETTING(      0x0000, "60" )
  1484.     PORT_DIPNAME( 0x0c00, 0x0c00, "Period Length" )
  1485.     PORT_DIPSETTING(      0x0c00, "2 Minutes" )
  1486.     PORT_DIPSETTING(      0x0800, "3 Minutes" )
  1487.     PORT_DIPSETTING(      0x0400, "4 Minutes" )
  1488.     PORT_DIPSETTING(      0x0000, "5 Minutes" )
  1489.     PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
  1490.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  1491.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1492.     PORT_DIPNAME( 0x6000, 0x6000, DEF_STR( Difficulty ) )
  1493.     PORT_DIPSETTING(      0x6000, "Easy" )
  1494.     PORT_DIPSETTING(      0x4000, "Medium" )
  1495.     PORT_DIPSETTING(      0x2000, "Hard" )
  1496.     PORT_DIPSETTING(      0x0000, "Hardest" )
  1497.     PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) )
  1498.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1499.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1500.  
  1501.     PORT_START    /* COIN/DSW3 */
  1502.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
  1503.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
  1504.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
  1505.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 )
  1506.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1507.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE2 )
  1508.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE3 )
  1509.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SERVICE4 )
  1510.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1511.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1512.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1513.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1514.     PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Flip_Screen ) )
  1515.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  1516.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1517.     PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
  1518.     PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
  1519.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1520.     PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
  1521.     PORT_DIPNAME( 0x8000, 0x8000, "Freeze" )
  1522.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1523.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1524.  
  1525.     PORT_START    /* IN0/IN1 */
  1526.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1527.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1528.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1529.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1530.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1531.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1532.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1533.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1534.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1535.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1536.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1537.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1538.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1539.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1540.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1541.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1542.  
  1543.     PORT_START    /* IN2/IN3 */
  1544.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
  1545.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  1546.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
  1547.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
  1548.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  1549.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  1550.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1551.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1552.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
  1553.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  1554.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
  1555.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
  1556.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  1557.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  1558.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1559.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1560. INPUT_PORTS_END
  1561.  
  1562. INPUT_PORTS_START( punksht2 )
  1563.     PORT_START    /* DSW1/DSW2 */
  1564.     PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) )
  1565.     PORT_DIPSETTING(      0x0000, DEF_STR( 5C_1C ) )
  1566.     PORT_DIPSETTING(      0x0002, DEF_STR( 4C_1C ) )
  1567.     PORT_DIPSETTING(      0x0005, DEF_STR( 3C_1C ) )
  1568.     PORT_DIPSETTING(      0x0008, DEF_STR( 2C_1C ) )
  1569.     PORT_DIPSETTING(      0x0004, DEF_STR( 3C_2C ) )
  1570.     PORT_DIPSETTING(      0x0001, DEF_STR( 4C_3C ) )
  1571.     PORT_DIPSETTING(      0x000f, DEF_STR( 1C_1C ) )
  1572.     PORT_DIPSETTING(      0x0003, DEF_STR( 3C_4C ) )
  1573.     PORT_DIPSETTING(      0x0007, DEF_STR( 2C_3C ) )
  1574.     PORT_DIPSETTING(      0x000e, DEF_STR( 1C_2C ) )
  1575.     PORT_DIPSETTING(      0x0006, DEF_STR( 2C_5C ) )
  1576.     PORT_DIPSETTING(      0x000d, DEF_STR( 1C_3C ) )
  1577.     PORT_DIPSETTING(      0x000c, DEF_STR( 1C_4C ) )
  1578.     PORT_DIPSETTING(      0x000b, DEF_STR( 1C_5C ) )
  1579.     PORT_DIPSETTING(      0x000a, DEF_STR( 1C_6C ) )
  1580.     PORT_DIPSETTING(      0x0009, DEF_STR( 1C_7C ) )
  1581.     PORT_DIPNAME( 0x0010, 0x0010, "Continue" )
  1582.     PORT_DIPSETTING(      0x0010, "Normal" )
  1583.     PORT_DIPSETTING(      0x0000, "1 Coin" )
  1584.     PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
  1585.     PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  1586.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1587.     PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
  1588.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1589.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1590.     PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
  1591.     PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  1592.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1593.     PORT_DIPNAME( 0x0300, 0x0300, "Energy" )
  1594.     PORT_DIPSETTING(      0x0300, "40" )
  1595.     PORT_DIPSETTING(      0x0200, "50" )
  1596.     PORT_DIPSETTING(      0x0100, "60" )
  1597.     PORT_DIPSETTING(      0x0000, "70" )
  1598.     PORT_DIPNAME( 0x0c00, 0x0c00, "Period Length" )
  1599.     PORT_DIPSETTING(      0x0c00, "3 Minutes" )
  1600.     PORT_DIPSETTING(      0x0800, "4 Minutes" )
  1601.     PORT_DIPSETTING(      0x0400, "5 Minutes" )
  1602.     PORT_DIPSETTING(      0x0000, "6 Minutes" )
  1603.     PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
  1604.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  1605.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1606.     PORT_DIPNAME( 0x6000, 0x6000, DEF_STR( Difficulty ) )
  1607.     PORT_DIPSETTING(      0x6000, "Easy" )
  1608.     PORT_DIPSETTING(      0x4000, "Medium" )
  1609.     PORT_DIPSETTING(      0x2000, "Hard" )
  1610.     PORT_DIPSETTING(      0x0000, "Hardest" )
  1611.     PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) )
  1612.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1613.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1614.  
  1615.     PORT_START    /* COIN/DSW3 */
  1616.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
  1617.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
  1618.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1619.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1620.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN3 )
  1621.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1622.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1623.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1624.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
  1625.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
  1626.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1627.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1628.     PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Flip_Screen ) )
  1629.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  1630.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1631.     PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
  1632.     PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
  1633.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1634.     PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
  1635.     PORT_DIPNAME( 0x8000, 0x8000, "Freeze" )
  1636.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1637.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1638.  
  1639.     PORT_START    /* IN0/IN1 */
  1640.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1641.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1642.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1643.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1644.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1645.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1646.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1647.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1648.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1649.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1650.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1651.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1652.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1653.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1654.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1655.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1656. INPUT_PORTS_END
  1657.  
  1658. INPUT_PORTS_START( lgtnfght )
  1659.     PORT_START
  1660.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1661.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1662.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )    /* vblank? checked during boot */
  1663.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  1664.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  1665.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1666.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
  1667.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1668.  
  1669.     PORT_START
  1670.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER1 )
  1671.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1672.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER1 )
  1673.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER1 )
  1674.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1675.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1676.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  1677.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER1 )
  1678.  
  1679.     PORT_START
  1680.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
  1681.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1682.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
  1683.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
  1684.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1685.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1686.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  1687.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
  1688.  
  1689.     PORT_START    /* DSW1 */
  1690.     PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
  1691.     PORT_DIPSETTING(    0x03, "2" )
  1692.     PORT_DIPSETTING(    0x02, "3" )
  1693.     PORT_DIPSETTING(    0x01, "5" )
  1694.     PORT_DIPSETTING(    0x00, "7" )
  1695.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  1696.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  1697.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1698.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) )
  1699.     PORT_DIPSETTING(    0x18, "100000 400000" )
  1700.     PORT_DIPSETTING(    0x10, "150000 500000" )
  1701.     PORT_DIPSETTING(    0x08, "200000" )
  1702.     PORT_DIPSETTING(    0x00, "None" )
  1703.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  1704.     PORT_DIPSETTING(    0x60, "Easy" )
  1705.     PORT_DIPSETTING(    0x40, "Medium" )
  1706.     PORT_DIPSETTING(    0x20, "Hard" )
  1707.     PORT_DIPSETTING(    0x00, "Hardest" )
  1708.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  1709.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1710.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1711.  
  1712.     PORT_START    /* DSW2 */
  1713.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  1714.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  1715.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  1716.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  1717.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  1718.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  1719.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  1720.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  1721.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  1722.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  1723.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  1724.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  1725.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  1726.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  1727.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  1728.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  1729.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  1730.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  1731.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  1732.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  1733.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  1734.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  1735.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  1736.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  1737.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  1738.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  1739.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  1740.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  1741.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  1742.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  1743.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  1744.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  1745.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  1746. //    PORT_DIPSETTING(    0x00, "Invalid" )
  1747.  
  1748.     PORT_START    /* DSW3 */
  1749.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  1750.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1751.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1752.     PORT_DIPNAME( 0x02, 0x00, "Sound" )
  1753.     PORT_DIPSETTING(    0x02, "Mono" )
  1754.     PORT_DIPSETTING(    0x00, "Stereo" )
  1755.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  1756.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1757.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1758.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1759.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  1760. INPUT_PORTS_END
  1761.  
  1762. INPUT_PORTS_START( detatwin )
  1763.     PORT_START    /* IN0 */
  1764.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1765.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1766.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1767.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1768.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1769.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1770.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1771.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1772.  
  1773.     PORT_START    /* IN1 */
  1774.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1775.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1776.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1777.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1778.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1779.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1780.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1781.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1782.  
  1783.     PORT_START    /* COIN */
  1784.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1785.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1786.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  1787.     PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  1788.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
  1789.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
  1790.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* VBLANK? OBJMPX? */
  1791.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1792.  
  1793.     PORT_START    /* EEPROM */
  1794.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )    /* EEPROM data */
  1795.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* EEPROM status? - always 1 */
  1796.     PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1797. INPUT_PORTS_END
  1798.  
  1799. INPUT_PORTS_START( glfgreat )
  1800.     PORT_START    /* IN0 */
  1801.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1802.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1803.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1804.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1805.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1806.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1807.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  1808.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER1 )
  1809.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1810.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1811.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1812.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1813.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1814.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1815.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  1816.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
  1817.  
  1818.     PORT_START    /* IN1 */
  1819.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
  1820.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  1821.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
  1822.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
  1823.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  1824.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  1825.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  1826.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER3 )
  1827.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
  1828.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  1829.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
  1830.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
  1831.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  1832.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  1833.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
  1834.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER4 )
  1835.  
  1836.     PORT_START
  1837.     PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) )
  1838.     PORT_DIPSETTING(      0x0002, DEF_STR( 4C_1C ) )
  1839.     PORT_DIPSETTING(      0x0005, DEF_STR( 3C_1C ) )
  1840.     PORT_DIPSETTING(      0x0008, DEF_STR( 2C_1C ) )
  1841.     PORT_DIPSETTING(      0x0004, DEF_STR( 3C_2C ) )
  1842.     PORT_DIPSETTING(      0x0001, DEF_STR( 4C_3C ) )
  1843.     PORT_DIPSETTING(      0x000f, DEF_STR( 1C_1C ) )
  1844.     PORT_DIPSETTING(      0x0003, DEF_STR( 3C_4C ) )
  1845.     PORT_DIPSETTING(      0x0007, DEF_STR( 2C_3C ) )
  1846.     PORT_DIPSETTING(      0x000e, DEF_STR( 1C_2C ) )
  1847.     PORT_DIPSETTING(      0x0006, DEF_STR( 2C_5C ) )
  1848.     PORT_DIPSETTING(      0x000d, DEF_STR( 1C_3C ) )
  1849.     PORT_DIPSETTING(      0x000c, DEF_STR( 1C_4C ) )
  1850.     PORT_DIPSETTING(      0x000b, DEF_STR( 1C_5C ) )
  1851.     PORT_DIPSETTING(      0x000a, DEF_STR( 1C_6C ) )
  1852.     PORT_DIPSETTING(      0x0009, DEF_STR( 1C_7C ) )
  1853.     PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
  1854.     PORT_DIPNAME( 0x00f0, 0x00f0, DEF_STR( Coin_B ) )
  1855.     PORT_DIPSETTING(      0x0020, DEF_STR( 4C_1C ) )
  1856.     PORT_DIPSETTING(      0x0050, DEF_STR( 3C_1C ) )
  1857.     PORT_DIPSETTING(      0x0080, DEF_STR( 2C_1C ) )
  1858.     PORT_DIPSETTING(      0x0040, DEF_STR( 3C_2C ) )
  1859.     PORT_DIPSETTING(      0x0010, DEF_STR( 4C_3C ) )
  1860.     PORT_DIPSETTING(      0x00f0, DEF_STR( 1C_1C ) )
  1861.     PORT_DIPSETTING(      0x0030, DEF_STR( 3C_4C ) )
  1862.     PORT_DIPSETTING(      0x0070, DEF_STR( 2C_3C ) )
  1863.     PORT_DIPSETTING(      0x00e0, DEF_STR( 1C_2C ) )
  1864.     PORT_DIPSETTING(      0x0060, DEF_STR( 2C_5C ) )
  1865.     PORT_DIPSETTING(      0x00d0, DEF_STR( 1C_3C ) )
  1866.     PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_4C ) )
  1867.     PORT_DIPSETTING(      0x00b0, DEF_STR( 1C_5C ) )
  1868.     PORT_DIPSETTING(      0x00a0, DEF_STR( 1C_6C ) )
  1869.     PORT_DIPSETTING(      0x0090, DEF_STR( 1C_7C ) )
  1870. //    PORT_DIPSETTING(      0x0000, "Invalid" )
  1871.     PORT_DIPNAME( 0x0300, 0x0100, "Players/Controllers" )
  1872.     PORT_DIPSETTING(      0x0300, "4/1" )
  1873.     PORT_DIPSETTING(      0x0200, "4/2" )
  1874.     PORT_DIPSETTING(      0x0100, "4/4" )
  1875.     PORT_DIPSETTING(      0x0000, "3/3" )
  1876.     PORT_DIPNAME( 0x0400, 0x0000, "Sound" )
  1877.     PORT_DIPSETTING(      0x0400, "Mono" )
  1878.     PORT_DIPSETTING(      0x0000, "Stereo" )
  1879.     PORT_DIPNAME( 0x1800, 0x1800, "Initial/Maximum Credit" )
  1880.     PORT_DIPSETTING(      0x1800, "2/3" )
  1881.     PORT_DIPSETTING(      0x1000, "2/4" )
  1882.     PORT_DIPSETTING(      0x0800, "2/5" )
  1883.     PORT_DIPSETTING(      0x0000, "3/5" )
  1884.     PORT_DIPNAME( 0x6000, 0x4000, DEF_STR( Difficulty ) )
  1885.     PORT_DIPSETTING(      0x6000, "Easy" )
  1886.     PORT_DIPSETTING(      0x4000, "Normal" )
  1887.     PORT_DIPSETTING(      0x2000, "Hard" )
  1888.     PORT_DIPSETTING(      0x0000, "Hardest" )
  1889.     PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) )
  1890.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1891.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1892.  
  1893.     PORT_START
  1894.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
  1895.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
  1896.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
  1897.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 )
  1898.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )    /* service coin */
  1899.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1900.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1901.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1902.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
  1903.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
  1904.     PORT_BITX(0x0400, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  1905.     PORT_DIPNAME( 0x8000, 0x0000, "Freeze" )    /* ?? VBLANK ?? */
  1906.     PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  1907.     PORT_DIPSETTING(      0x8000, DEF_STR( On ) )
  1908.     PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Flip_Screen ) )
  1909.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  1910.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1911.     PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
  1912.     PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
  1913.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1914. //    PORT_SERVICE( 0x4000, IP_ACTIVE_LOW )
  1915.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE )
  1916.     PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
  1917.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1918.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1919. INPUT_PORTS_END
  1920.  
  1921. INPUT_PORTS_START( ssridr4p )
  1922.     PORT_START    /* IN0 */
  1923.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1924.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1925.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1926.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1927.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1928.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1929.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1930.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1931.  
  1932.     PORT_START    /* IN1 */
  1933.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1934.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1935.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1936.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1937.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1938.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1939.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1940.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1941.  
  1942.     PORT_START    /* COIN */
  1943.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1944.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1945.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  1946.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
  1947.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1948.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 )
  1949.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 )
  1950.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 )
  1951.  
  1952.     PORT_START    /* EEPROM and service */
  1953.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )    /* EEPROM data */
  1954.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* EEPROM status? - always 1 */
  1955.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: OBJMPX */
  1956.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: NVBLK */
  1957.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: IPL0 */
  1958.     PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* unused? */
  1959.     PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  1960.  
  1961.     PORT_START    /* IN2 */
  1962.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
  1963.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  1964.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
  1965.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
  1966.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  1967.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  1968.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1969.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1970.  
  1971.     PORT_START    /* IN3 */
  1972.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
  1973.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  1974.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
  1975.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
  1976.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  1977.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  1978.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1979.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1980. INPUT_PORTS_END
  1981.  
  1982. INPUT_PORTS_START( ssriders )
  1983.     PORT_START    /* IN0 */
  1984.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  1985.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  1986.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  1987.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  1988.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  1989.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  1990.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1991.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  1992.  
  1993.     PORT_START    /* IN1 */
  1994.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1995.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1996.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1997.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1998.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1999.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  2000.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2001.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  2002.  
  2003.     PORT_START    /* COIN */
  2004.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  2005.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  2006.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2007.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2008.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )
  2009.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 )
  2010.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2011.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2012.  
  2013.     PORT_START    /* EEPROM and service */
  2014.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )    /* EEPROM data */
  2015.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* EEPROM status? - always 1 */
  2016.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: OBJMPX */
  2017.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: NVBLK */
  2018.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: IPL0 */
  2019.     PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* unused? */
  2020.     PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2021. INPUT_PORTS_END
  2022.  
  2023. INPUT_PORTS_START( tmnt2a )
  2024.     PORT_START    /* IN0 */
  2025.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  2026.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  2027.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  2028.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  2029.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  2030.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  2031.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2032.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  2033.  
  2034.     PORT_START    /* IN1 */
  2035.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  2036.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  2037.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  2038.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  2039.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  2040.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  2041.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2042.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  2043.  
  2044.     PORT_START    /* COIN */
  2045.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  2046.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  2047.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  2048.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
  2049.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  2050.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 )
  2051.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 )
  2052.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 )
  2053.  
  2054.     PORT_START    /* EEPROM and service */
  2055.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )    /* EEPROM data */
  2056.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* EEPROM status? - always 1 */
  2057.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: OBJMPX */
  2058.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: NVBLK */
  2059.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* ?? TMNT2: IPL0 */
  2060.     PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* unused? */
  2061.     PORT_BITX(0x80, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2062.  
  2063.     PORT_START    /* IN2 */
  2064.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
  2065.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  2066.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
  2067.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
  2068.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  2069.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  2070.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2071.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
  2072.  
  2073.     PORT_START    /* IN3 */
  2074.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
  2075.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  2076.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
  2077.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
  2078.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  2079.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  2080.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2081.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
  2082. INPUT_PORTS_END
  2083.  
  2084. INPUT_PORTS_START( thndrx2 )
  2085.     PORT_START
  2086.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  2087.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  2088.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  2089.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  2090.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  2091.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  2092.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2093.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
  2094.     PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
  2095.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 )
  2096.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN3 )
  2097.     PORT_BITX(0x0800, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2098.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2099.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2100.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2101.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2102.  
  2103.     PORT_START    /* EEPROM and service */
  2104.     PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  2105.     PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  2106.     PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  2107.     PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  2108.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  2109.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  2110.     PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2111.     PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
  2112.     PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN )    /* EEPROM data */
  2113.     PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* EEPROM status? - always 1 */
  2114.     PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2115.     PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* VBLK?? */
  2116.     PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2117.     PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2118.     PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2119.     PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2120. INPUT_PORTS_END
  2121.  
  2122.  
  2123.  
  2124. static struct YM2151interface ym2151_interface =
  2125. {
  2126.     1,            /* 1 chip */
  2127.     3579545,    /* 3.579545 MHz */
  2128.     { YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) },
  2129.     { 0 }
  2130. };
  2131.  
  2132. static void volume_callback(int v)
  2133. {
  2134.     K007232_set_volume(0,0,(v >> 4) * 0x11,0);
  2135.     K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
  2136. }
  2137.  
  2138. static struct K007232_interface k007232_interface =
  2139. {
  2140.     1,        /* number of chips */
  2141.     { REGION_SOUND1 },    /* memory regions */
  2142.     { K007232_VOL(20,MIXER_PAN_CENTER,20,MIXER_PAN_CENTER) },    /* volume */
  2143.     { volume_callback }    /* external port callback */
  2144. };
  2145.  
  2146. static struct UPD7759_interface upd7759_interface =
  2147. {
  2148.     1,        /* number of chips */
  2149.     UPD7759_STANDARD_CLOCK,
  2150.     { 60 }, /* volume */
  2151.     { REGION_SOUND2 },        /* memory region */
  2152.     UPD7759_STANDALONE_MODE,        /* chip mode */
  2153.     {0}
  2154. };
  2155.  
  2156. static struct Samplesinterface samples_interface =
  2157. {
  2158.     1,    /* 1 channel for the title music */
  2159.     25    /* volume */
  2160. };
  2161.  
  2162. static struct CustomSound_interface custom_interface =
  2163. {
  2164.     tmnt_decode_sample,
  2165.     0,
  2166.     0
  2167. };
  2168.  
  2169. static struct K053260_interface k053260_interface_nmi =
  2170. {
  2171.     3579545,
  2172.     REGION_SOUND1, /* memory region */
  2173.     { MIXER(70,MIXER_PAN_LEFT), MIXER(70,MIXER_PAN_RIGHT) },
  2174. //    sound_nmi_callback,
  2175. };
  2176.  
  2177. static struct K053260_interface k053260_interface =
  2178. {
  2179.     3579545,
  2180.     REGION_SOUND1, /* memory region */
  2181.     { MIXER(70,MIXER_PAN_LEFT), MIXER(70,MIXER_PAN_RIGHT) },
  2182.     0
  2183. };
  2184.  
  2185. static struct K053260_interface glfgreat_k053260_interface =
  2186. {
  2187.     3579545,
  2188.     REGION_SOUND1, /* memory region */
  2189.     { MIXER(100,MIXER_PAN_LEFT), MIXER(100,MIXER_PAN_RIGHT) },
  2190. //    sound_nmi_callback,
  2191. };
  2192.  
  2193.  
  2194. static struct MachineDriver machine_driver_mia =
  2195. {
  2196.     /* basic machine hardware */
  2197.     {
  2198.         {
  2199.             CPU_M68000,
  2200.             8000000,    /* 8 MHz */
  2201.             mia_readmem,mia_writemem,0,0,
  2202.             m68_level5_irq,1
  2203.         },
  2204.         {
  2205.             CPU_Z80 | CPU_AUDIO_CPU,
  2206.             3579545,    /* 3.579545 MHz */
  2207.             mia_s_readmem,mia_s_writemem,0,0,
  2208.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2209.         }
  2210.     },
  2211.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2212.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2213.     0,
  2214.  
  2215.     /* video hardware */
  2216.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2217.     0,    /* gfx decoded by konamiic.c */
  2218.     1024, 1024,
  2219.     0,
  2220.  
  2221.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2222.     0,
  2223.     mia_vh_start,
  2224.     punkshot_vh_stop,
  2225.     mia_vh_screenrefresh,
  2226.  
  2227.     /* sound hardware */
  2228.     0,0,0,0,
  2229.     {
  2230.         {
  2231.             SOUND_YM2151,
  2232.             &ym2151_interface
  2233.         },
  2234.         {
  2235.             SOUND_K007232,
  2236.             &k007232_interface,
  2237.         }
  2238.     }
  2239. };
  2240.  
  2241. static struct MachineDriver machine_driver_tmnt =
  2242. {
  2243.     /* basic machine hardware */
  2244.     {
  2245.         {
  2246.             CPU_M68000,
  2247.             8000000,    /* 8 MHz */
  2248.             tmnt_readmem,tmnt_writemem,0,0,
  2249.             m68_level5_irq,1
  2250.         },
  2251.         {
  2252.             CPU_Z80 | CPU_AUDIO_CPU,
  2253.             3579545,    /* 3.579545 MHz */
  2254.             tmnt_s_readmem,tmnt_s_writemem,0,0,
  2255.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2256.         }
  2257.     },
  2258.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2259.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2260.     0,
  2261.  
  2262.     /* video hardware */
  2263.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2264.     0,    /* gfx decoded by konamiic.c */
  2265.     1024, 1024,
  2266.     0,
  2267.  
  2268.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2269.     0,
  2270.     tmnt_vh_start,
  2271.     punkshot_vh_stop,
  2272.     tmnt_vh_screenrefresh,
  2273.  
  2274.     /* sound hardware */
  2275.     0,0,0,0,
  2276.     {
  2277.         {
  2278.             SOUND_YM2151,
  2279.             &ym2151_interface
  2280.         },
  2281.         {
  2282.             SOUND_K007232,
  2283.             &k007232_interface,
  2284.         },
  2285.         {
  2286.             SOUND_UPD7759,
  2287.             &upd7759_interface
  2288.         },
  2289.         {
  2290.             SOUND_SAMPLES,
  2291.             &samples_interface
  2292.         },
  2293.         {
  2294.             SOUND_CUSTOM,    /* actually initializes the samples */
  2295.             &custom_interface
  2296.         }
  2297.     }
  2298. };
  2299.  
  2300. static struct MachineDriver machine_driver_punkshot =
  2301. {
  2302.     /* basic machine hardware */
  2303.     {
  2304.         {
  2305.             CPU_M68000,
  2306.             12000000,    /* CPU is 68000/12, but this doesn't necessarily mean it's */
  2307.                         /* running at 12MHz. TMNT uses 8MHz */
  2308.             punkshot_readmem,punkshot_writemem,0,0,
  2309.             punkshot_interrupt,1
  2310.         },
  2311.         {
  2312.             CPU_Z80 | CPU_AUDIO_CPU,
  2313.             3579545,    /* 3.579545 MHz */
  2314.             punkshot_s_readmem,punkshot_s_writemem,0,0,
  2315.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2316.                                 /* NMIs are generated by the 053260 */
  2317.         }
  2318.     },
  2319.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2320.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2321.     0,
  2322.  
  2323.     /* video hardware */
  2324.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2325.     0,    /* gfx decoded by konamiic.c */
  2326.     2048, 2048,
  2327.     0,
  2328.  
  2329.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2330.     0,
  2331.     punkshot_vh_start,
  2332.     punkshot_vh_stop,
  2333.     punkshot_vh_screenrefresh,
  2334.  
  2335.     /* sound hardware */
  2336.     0,0,0,0,
  2337.     {
  2338.         {
  2339.             SOUND_YM2151,
  2340.             &ym2151_interface
  2341.         },
  2342.         {
  2343.             SOUND_K053260,
  2344.             &k053260_interface_nmi
  2345.         }
  2346.     }
  2347. };
  2348.  
  2349. static struct MachineDriver machine_driver_lgtnfght =
  2350. {
  2351.     /* basic machine hardware */
  2352.     {
  2353.         {
  2354.             CPU_M68000,
  2355.             12000000,    /* 12 MHz */
  2356.             lgtnfght_readmem,lgtnfght_writemem,0,0,
  2357.             lgtnfght_interrupt,1
  2358.         },
  2359.         {
  2360.             CPU_Z80 | CPU_AUDIO_CPU,
  2361.             3579545,    /* 3.579545 MHz */
  2362.             lgtnfght_s_readmem,lgtnfght_s_writemem,0,0,
  2363.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2364.         }
  2365.     },
  2366.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2367.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2368.     0,
  2369.  
  2370.     /* video hardware */
  2371.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2372.     0,    /* gfx decoded by konamiic.c */
  2373.     2048, 2048,
  2374.     0,
  2375.  
  2376.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2377.     0,
  2378.     lgtnfght_vh_start,
  2379.     lgtnfght_vh_stop,
  2380.     lgtnfght_vh_screenrefresh,
  2381.  
  2382.     /* sound hardware */
  2383.     SOUND_SUPPORTS_STEREO,0,0,0,
  2384.     {
  2385.         {
  2386.             SOUND_YM2151,
  2387.             &ym2151_interface
  2388.         },
  2389.         {
  2390.             SOUND_K053260,
  2391.             &k053260_interface
  2392.         }
  2393.     }
  2394. };
  2395.  
  2396. static struct MachineDriver machine_driver_detatwin =
  2397. {
  2398.     /* basic machine hardware */
  2399.     {
  2400.         {
  2401.             CPU_M68000,
  2402.             16000000,    /* 16 MHz */
  2403.             detatwin_readmem,detatwin_writemem,0,0,
  2404.             punkshot_interrupt,1
  2405.         },
  2406.         {
  2407.             CPU_Z80 | CPU_AUDIO_CPU,
  2408.             3579545,    /* ????? */
  2409.             ssriders_s_readmem,ssriders_s_writemem,0,0,
  2410.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2411.                                 /* NMIs are generated by the 053260 */
  2412.         }
  2413.     },
  2414.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2415.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2416.     0,
  2417.  
  2418.     /* video hardware */
  2419.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2420.     0,    /* gfx decoded by konamiic.c */
  2421.     2048, 2048,
  2422.     0,
  2423.  
  2424.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2425.     0,
  2426.     detatwin_vh_start,
  2427.     detatwin_vh_stop,
  2428.     lgtnfght_vh_screenrefresh,
  2429.  
  2430.     /* sound hardware */
  2431.     SOUND_SUPPORTS_STEREO,0,0,0,
  2432.     {
  2433.         {
  2434.             SOUND_YM2151,
  2435.             &ym2151_interface
  2436.         },
  2437.         {
  2438.             SOUND_K053260,
  2439.             &k053260_interface_nmi
  2440.         }
  2441.     },
  2442.  
  2443.     nvram_handler
  2444. };
  2445.  
  2446. static struct MachineDriver machine_driver_glfgreat =
  2447. {
  2448.     /* basic machine hardware */
  2449.     {
  2450.         {
  2451.             CPU_M68000,
  2452.             12000000,    /* ? */
  2453.             glfgreat_readmem,glfgreat_writemem,0,0,
  2454.             lgtnfght_interrupt,1
  2455.         },
  2456.         {
  2457.             CPU_Z80 | CPU_AUDIO_CPU,
  2458.             3579545,    /* ? */
  2459.             glfgreat_s_readmem,glfgreat_s_writemem,0,0,
  2460.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2461.                                 /* NMIs are generated by the 053260 */
  2462.         }
  2463.     },
  2464.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2465.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2466.     0,
  2467.  
  2468.     /* video hardware */
  2469.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2470.     0,    /* gfx decoded by konamiic.c */
  2471.     2048, 2048,
  2472.     0,
  2473.  
  2474.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2475.     0,
  2476.     glfgreat_vh_start,
  2477.     glfgreat_vh_stop,
  2478.     glfgreat_vh_screenrefresh,
  2479.  
  2480.     /* sound hardware */
  2481.     SOUND_SUPPORTS_STEREO,0,0,0,
  2482.     {
  2483.         {
  2484.             SOUND_K053260,
  2485.             &glfgreat_k053260_interface
  2486.         }
  2487.     }
  2488. };
  2489.  
  2490. static struct MachineDriver machine_driver_tmnt2 =
  2491. {
  2492.     /* basic machine hardware */
  2493.     {
  2494.         {
  2495.             CPU_M68000,
  2496.             16000000,    /* 16 MHz */
  2497.             tmnt2_readmem,tmnt2_writemem,0,0,
  2498.             punkshot_interrupt,1
  2499.         },
  2500.         {
  2501.             CPU_Z80 | CPU_AUDIO_CPU,
  2502.             2*3579545,    /* makes the ROM test sync */
  2503.             ssriders_s_readmem,ssriders_s_writemem,0,0,
  2504.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2505.                                 /* NMIs are generated by the 053260 */
  2506.         }
  2507.     },
  2508.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2509.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2510.     0,
  2511.  
  2512.     /* video hardware */
  2513.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2514.     0,    /* gfx decoded by konamiic.c */
  2515.     2048, 2048,
  2516.     0,
  2517.  
  2518.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2519.     0,
  2520.     lgtnfght_vh_start,
  2521.     lgtnfght_vh_stop,
  2522.     lgtnfght_vh_screenrefresh,
  2523.  
  2524.     /* sound hardware */
  2525.     SOUND_SUPPORTS_STEREO,0,0,0,
  2526.     {
  2527.         {
  2528.             SOUND_YM2151,
  2529.             &ym2151_interface
  2530.         },
  2531.         {
  2532.             SOUND_K053260,
  2533.             &k053260_interface_nmi
  2534.         }
  2535.     },
  2536.  
  2537.     nvram_handler
  2538. };
  2539.  
  2540. static struct MachineDriver machine_driver_ssriders =
  2541. {
  2542.     /* basic machine hardware */
  2543.     {
  2544.         {
  2545.             CPU_M68000,
  2546.             16000000,    /* 16 MHz */
  2547.             ssriders_readmem,ssriders_writemem,0,0,
  2548.             punkshot_interrupt,1
  2549.         },
  2550.         {
  2551.             CPU_Z80 | CPU_AUDIO_CPU,
  2552.             4000000,    /* ????? makes the ROM test sync */
  2553.             ssriders_s_readmem,ssriders_s_writemem,0,0,
  2554.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2555.                                 /* NMIs are generated by the 053260 */
  2556.         }
  2557.     },
  2558.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2559.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2560.     0,
  2561.  
  2562.     /* video hardware */
  2563.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2564.     0,    /* gfx decoded by konamiic.c */
  2565.     2048, 2048,
  2566.     0,
  2567.  
  2568.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2569.     0,
  2570.     lgtnfght_vh_start,
  2571.     lgtnfght_vh_stop,
  2572.     ssriders_vh_screenrefresh,
  2573.  
  2574.     /* sound hardware */
  2575.     SOUND_SUPPORTS_STEREO,0,0,0,
  2576.     {
  2577.         {
  2578.             SOUND_YM2151,
  2579.             &ym2151_interface
  2580.         },
  2581.         {
  2582.             SOUND_K053260,
  2583.             &k053260_interface_nmi
  2584.         }
  2585.     },
  2586.  
  2587.     nvram_handler
  2588. };
  2589.  
  2590. static struct MachineDriver machine_driver_thndrx2 =
  2591. {
  2592.     /* basic machine hardware */
  2593.     {
  2594.         {
  2595.             CPU_M68000,
  2596.             12000000,    /* 12 MHz */
  2597.             thndrx2_readmem,thndrx2_writemem,0,0,
  2598.             punkshot_interrupt,1
  2599.         },
  2600.         {
  2601.             CPU_Z80 | CPU_AUDIO_CPU,
  2602.             3579545,    /* ????? */
  2603.             thndrx2_s_readmem,thndrx2_s_writemem,0,0,
  2604.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  2605.                                 /* NMIs are generated by the 053260 */
  2606.         }
  2607.     },
  2608.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  2609.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  2610.     0,
  2611.  
  2612.     /* video hardware */
  2613.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  2614.     0,    /* gfx decoded by konamiic.c */
  2615.     2048, 2048,
  2616.     0,
  2617.  
  2618.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2619.     0,
  2620.     thndrx2_vh_start,
  2621.     thndrx2_vh_stop,
  2622.     thndrx2_vh_screenrefresh,
  2623.  
  2624.     /* sound hardware */
  2625.     SOUND_SUPPORTS_STEREO,0,0,0,
  2626.     {
  2627.         {
  2628.             SOUND_YM2151,
  2629.             &ym2151_interface
  2630.         },
  2631.         {
  2632.             SOUND_K053260,
  2633.             &k053260_interface_nmi
  2634.         }
  2635.     },
  2636.  
  2637.     thndrx2_nvram_handler
  2638. };
  2639.  
  2640.  
  2641.  
  2642. /***************************************************************************
  2643.  
  2644.   Game driver(s)
  2645.  
  2646. ***************************************************************************/
  2647.  
  2648. ROM_START( mia )
  2649.     ROM_REGION( 0x40000, REGION_CPU1 )    /* 2*128k and 2*64k for 68000 code */
  2650.     ROM_LOAD_EVEN( "808t20.h17",   0x00000, 0x20000, 0x6f0acb1d )
  2651.     ROM_LOAD_ODD ( "808t21.j17",   0x00000, 0x20000, 0x42a30416 )
  2652.  
  2653.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2654.     ROM_LOAD( "808e03.f4",    0x00000, 0x08000, 0x3d93a7cd )
  2655.  
  2656.     ROM_REGION( 0x40000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2657.     ROM_LOAD_GFX_EVEN( "808e12.f28",   0x000000, 0x10000, 0xd62f1fde )        /* 8x8 tiles */
  2658.     ROM_LOAD_GFX_ODD ( "808e13.h28",   0x000000, 0x10000, 0x1fa708f4 )        /* 8x8 tiles */
  2659.     ROM_LOAD_GFX_EVEN( "808e22.i28",   0x020000, 0x10000, 0x73d758f6 )        /* 8x8 tiles */
  2660.     ROM_LOAD_GFX_ODD ( "808e23.k28",   0x020000, 0x10000, 0x8ff08b21 )        /* 8x8 tiles */
  2661.  
  2662.     ROM_REGION( 0x100000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2663.     ROM_LOAD( "808d17.j4",    0x00000, 0x80000, 0xd1299082 )    /* sprites */
  2664.     ROM_LOAD( "808d15.h4",    0x80000, 0x80000, 0x2b22a6b6 )
  2665.  
  2666.     ROM_REGION( 0x0100, REGION_PROMS )
  2667.     ROM_LOAD( "808a18.f16",   0x0000, 0x0100, 0xeb95aede )    /* priority encoder (not used) */
  2668.  
  2669.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the samples */
  2670.     ROM_LOAD( "808d01.d4",    0x00000, 0x20000, 0xfd4d37c0 ) /* samples for 007232 */
  2671. ROM_END
  2672.  
  2673. ROM_START( mia2 )
  2674.     ROM_REGION( 0x40000, REGION_CPU1 )    /* 2*128k and 2*64k for 68000 code */
  2675.     ROM_LOAD_EVEN( "808s20.h17",   0x00000, 0x20000, 0xcaa2897f )
  2676.     ROM_LOAD_ODD ( "808s21.j17",   0x00000, 0x20000, 0x3d892ffb )
  2677.  
  2678.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2679.     ROM_LOAD( "808e03.f4",    0x00000, 0x08000, 0x3d93a7cd )
  2680.  
  2681.     ROM_REGION( 0x40000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2682.     ROM_LOAD_GFX_EVEN( "808e12.f28",   0x000000, 0x10000, 0xd62f1fde )        /* 8x8 tiles */
  2683.     ROM_LOAD_GFX_ODD ( "808e13.h28",   0x000000, 0x10000, 0x1fa708f4 )        /* 8x8 tiles */
  2684.     ROM_LOAD_GFX_EVEN( "808e22.i28",   0x020000, 0x10000, 0x73d758f6 )        /* 8x8 tiles */
  2685.     ROM_LOAD_GFX_ODD ( "808e23.k28",   0x020000, 0x10000, 0x8ff08b21 )        /* 8x8 tiles */
  2686.  
  2687.     ROM_REGION( 0x100000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2688.     ROM_LOAD( "808d17.j4",    0x00000, 0x80000, 0xd1299082 )    /* sprites */
  2689.     ROM_LOAD( "808d15.h4",    0x80000, 0x80000, 0x2b22a6b6 )
  2690.  
  2691.     ROM_REGION( 0x0100, REGION_PROMS )
  2692.     ROM_LOAD( "808a18.f16",   0x0000, 0x0100, 0xeb95aede )    /* priority encoder (not used) */
  2693.  
  2694.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the samples */
  2695.     ROM_LOAD( "808d01.d4",    0x00000, 0x20000, 0xfd4d37c0 ) /* samples for 007232 */
  2696. ROM_END
  2697.  
  2698. ROM_START( tmnt )
  2699.     ROM_REGION( 0x60000, REGION_CPU1 )    /* 2*128k and 2*64k for 68000 code */
  2700.     ROM_LOAD_EVEN( "963-r23",      0x00000, 0x20000, 0xa7f61195 )
  2701.     ROM_LOAD_ODD ( "963-r24",      0x00000, 0x20000, 0x661e056a )
  2702.     ROM_LOAD_EVEN( "963-r21",      0x40000, 0x10000, 0xde047bb6 )
  2703.     ROM_LOAD_ODD ( "963-r22",      0x40000, 0x10000, 0xd86a0888 )
  2704.  
  2705.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2706.     ROM_LOAD( "963-e20",      0x00000, 0x08000, 0x1692a6d6 )
  2707.  
  2708.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2709.     ROM_LOAD( "963-a28",      0x000000, 0x80000, 0xdb4769a8 )        /* 8x8 tiles */
  2710.     ROM_LOAD( "963-a29",      0x080000, 0x80000, 0x8069cd2e )        /* 8x8 tiles */
  2711.  
  2712.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2713.     ROM_LOAD( "963-a17",      0x000000, 0x80000, 0xb5239a44 )        /* sprites */
  2714.     ROM_LOAD( "963-a18",      0x080000, 0x80000, 0xdd51adef )        /* sprites */
  2715.     ROM_LOAD( "963-a15",      0x100000, 0x80000, 0x1f324eed )        /* sprites */
  2716.     ROM_LOAD( "963-a16",      0x180000, 0x80000, 0xd4bd9984 )        /* sprites */
  2717.  
  2718.     ROM_REGION( 0x0200, REGION_PROMS )
  2719.     ROM_LOAD( "tmnt.g7",      0x0000, 0x0100, 0xabd82680 )    /* sprite address decoder */
  2720.     ROM_LOAD( "tmnt.g19",     0x0100, 0x0100, 0xf8004a1c )    /* priority encoder (not used) */
  2721.  
  2722.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the samples */
  2723.     ROM_LOAD( "963-a26",      0x00000, 0x20000, 0xe2ac3063 ) /* samples for 007232 */
  2724.  
  2725.     ROM_REGION( 0x20000, REGION_SOUND2 )    /* 128k for the samples */
  2726.     ROM_LOAD( "963-a27",      0x00000, 0x20000, 0x2dfd674b ) /* samples for UPD7759C */
  2727.  
  2728.     ROM_REGION( 0x80000, REGION_SOUND3 )    /* 512k for the title music sample */
  2729.     ROM_LOAD( "963-a25",      0x00000, 0x80000, 0xfca078c7 )
  2730. ROM_END
  2731.  
  2732. ROM_START( tmht )
  2733.     ROM_REGION( 0x60000, REGION_CPU1 )    /* 2*128k and 2*64k for 68000 code */
  2734.     ROM_LOAD_EVEN( "963f23.j17",   0x00000, 0x20000, 0x9cb5e461 )
  2735.     ROM_LOAD_ODD ( "963f24.k17",   0x00000, 0x20000, 0x2d902fab )
  2736.     ROM_LOAD_EVEN( "963f21.j15",   0x40000, 0x10000, 0x9fa25378 )
  2737.     ROM_LOAD_ODD ( "963f22.k15",   0x40000, 0x10000, 0x2127ee53 )
  2738.  
  2739.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2740.     ROM_LOAD( "963-e20",      0x00000, 0x08000, 0x1692a6d6 )
  2741.  
  2742.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2743.     ROM_LOAD( "963-a28",      0x000000, 0x80000, 0xdb4769a8 )        /* 8x8 tiles */
  2744.     ROM_LOAD( "963-a29",      0x080000, 0x80000, 0x8069cd2e )        /* 8x8 tiles */
  2745.  
  2746.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2747.     ROM_LOAD( "963-a17",      0x000000, 0x80000, 0xb5239a44 )        /* sprites */
  2748.     ROM_LOAD( "963-a18",      0x080000, 0x80000, 0xdd51adef )        /* sprites */
  2749.     ROM_LOAD( "963-a15",      0x100000, 0x80000, 0x1f324eed )        /* sprites */
  2750.     ROM_LOAD( "963-a16",      0x180000, 0x80000, 0xd4bd9984 )        /* sprites */
  2751.  
  2752.     ROM_REGION( 0x0200, REGION_PROMS )
  2753.     ROM_LOAD( "tmnt.g7",      0x0000, 0x0100, 0xabd82680 )    /* sprite address decoder */
  2754.     ROM_LOAD( "tmnt.g19",     0x0100, 0x0100, 0xf8004a1c )    /* priority encoder (not used) */
  2755.  
  2756.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the samples */
  2757.     ROM_LOAD( "963-a26",      0x00000, 0x20000, 0xe2ac3063 ) /* samples for 007232 */
  2758.  
  2759.     ROM_REGION( 0x20000, REGION_SOUND2 )    /* 128k for the samples */
  2760.     ROM_LOAD( "963-a27",      0x00000, 0x20000, 0x2dfd674b ) /* samples for UPD7759C */
  2761.  
  2762.     ROM_REGION( 0x80000, REGION_SOUND3 )    /* 512k for the title music sample */
  2763.     ROM_LOAD( "963-a25",      0x00000, 0x80000, 0xfca078c7 )
  2764. ROM_END
  2765.  
  2766. ROM_START( tmntj )
  2767.     ROM_REGION( 0x60000, REGION_CPU1 )    /* 2*128k and 2*64k for 68000 code */
  2768.     ROM_LOAD_EVEN( "963-x23",      0x00000, 0x20000, 0xa9549004 )
  2769.     ROM_LOAD_ODD ( "963-x24",      0x00000, 0x20000, 0xe5cc9067 )
  2770.     ROM_LOAD_EVEN( "963-x21",      0x40000, 0x10000, 0x5789cf92 )
  2771.     ROM_LOAD_ODD ( "963-x22",      0x40000, 0x10000, 0x0a74e277 )
  2772.  
  2773.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2774.     ROM_LOAD( "963-e20",      0x00000, 0x08000, 0x1692a6d6 )
  2775.  
  2776.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2777.     ROM_LOAD( "963-a28",      0x000000, 0x80000, 0xdb4769a8 )        /* 8x8 tiles */
  2778.     ROM_LOAD( "963-a29",      0x080000, 0x80000, 0x8069cd2e )        /* 8x8 tiles */
  2779.  
  2780.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2781.     ROM_LOAD( "963-a17",      0x000000, 0x80000, 0xb5239a44 )        /* sprites */
  2782.     ROM_LOAD( "963-a18",      0x080000, 0x80000, 0xdd51adef )        /* sprites */
  2783.     ROM_LOAD( "963-a15",      0x100000, 0x80000, 0x1f324eed )        /* sprites */
  2784.     ROM_LOAD( "963-a16",      0x180000, 0x80000, 0xd4bd9984 )        /* sprites */
  2785.  
  2786.     ROM_REGION( 0x0200, REGION_PROMS )
  2787.     ROM_LOAD( "tmnt.g7",      0x0000, 0x0100, 0xabd82680 )    /* sprite address decoder */
  2788.     ROM_LOAD( "tmnt.g19",     0x0100, 0x0100, 0xf8004a1c )    /* priority encoder (not used) */
  2789.  
  2790.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the samples */
  2791.     ROM_LOAD( "963-a26",      0x00000, 0x20000, 0xe2ac3063 ) /* samples for 007232 */
  2792.  
  2793.     ROM_REGION( 0x20000, REGION_SOUND2 )    /* 128k for the samples */
  2794.     ROM_LOAD( "963-a27",      0x00000, 0x20000, 0x2dfd674b ) /* samples for UPD7759C */
  2795.  
  2796.     ROM_REGION( 0x80000, REGION_SOUND3 )    /* 512k for the title music sample */
  2797.     ROM_LOAD( "963-a25",      0x00000, 0x80000, 0xfca078c7 )
  2798. ROM_END
  2799.  
  2800. ROM_START( tmht2p )
  2801.     ROM_REGION( 0x60000, REGION_CPU1 )    /* 2*128k and 2*64k for 68000 code */
  2802.     ROM_LOAD_EVEN( "963-u23",      0x00000, 0x20000, 0x58bec748 )
  2803.     ROM_LOAD_ODD ( "963-u24",      0x00000, 0x20000, 0xdce87c8d )
  2804.     ROM_LOAD_EVEN( "963-u21",      0x40000, 0x10000, 0xabce5ead )
  2805.     ROM_LOAD_ODD ( "963-u22",      0x40000, 0x10000, 0x4ecc8d6b )
  2806.  
  2807.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2808.     ROM_LOAD( "963-e20",      0x00000, 0x08000, 0x1692a6d6 )
  2809.  
  2810.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2811.     ROM_LOAD( "963-a28",      0x000000, 0x80000, 0xdb4769a8 )        /* 8x8 tiles */
  2812.     ROM_LOAD( "963-a29",      0x080000, 0x80000, 0x8069cd2e )        /* 8x8 tiles */
  2813.  
  2814.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2815.     ROM_LOAD( "963-a17",      0x000000, 0x80000, 0xb5239a44 )        /* sprites */
  2816.     ROM_LOAD( "963-a18",      0x080000, 0x80000, 0xdd51adef )        /* sprites */
  2817.     ROM_LOAD( "963-a15",      0x100000, 0x80000, 0x1f324eed )        /* sprites */
  2818.     ROM_LOAD( "963-a16",      0x180000, 0x80000, 0xd4bd9984 )        /* sprites */
  2819.  
  2820.     ROM_REGION( 0x0200, REGION_PROMS )
  2821.     ROM_LOAD( "tmnt.g7",      0x0000, 0x0100, 0xabd82680 )    /* sprite address decoder */
  2822.     ROM_LOAD( "tmnt.g19",     0x0100, 0x0100, 0xf8004a1c )    /* priority encoder (not used) */
  2823.  
  2824.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the samples */
  2825.     ROM_LOAD( "963-a26",      0x00000, 0x20000, 0xe2ac3063 ) /* samples for 007232 */
  2826.  
  2827.     ROM_REGION( 0x20000, REGION_SOUND2 )    /* 128k for the samples */
  2828.     ROM_LOAD( "963-a27",      0x00000, 0x20000, 0x2dfd674b ) /* samples for UPD7759C */
  2829.  
  2830.     ROM_REGION( 0x80000, REGION_SOUND3 )    /* 512k for the title music sample */
  2831.     ROM_LOAD( "963-a25",      0x00000, 0x80000, 0xfca078c7 )
  2832. ROM_END
  2833.  
  2834. ROM_START( tmnt2pj )
  2835.     ROM_REGION( 0x60000, REGION_CPU1 )    /* 2*128k and 2*64k for 68000 code */
  2836.     ROM_LOAD_EVEN( "963-123",      0x00000, 0x20000, 0x6a3527c9 )
  2837.     ROM_LOAD_ODD ( "963-124",      0x00000, 0x20000, 0x2c4bfa15 )
  2838.     ROM_LOAD_EVEN( "963-121",      0x40000, 0x10000, 0x4181b733 )
  2839.     ROM_LOAD_ODD ( "963-122",      0x40000, 0x10000, 0xc64eb5ff )
  2840.  
  2841.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2842.     ROM_LOAD( "963-e20",      0x00000, 0x08000, 0x1692a6d6 )
  2843.  
  2844.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2845.     ROM_LOAD( "963-a28",      0x000000, 0x80000, 0xdb4769a8 )        /* 8x8 tiles */
  2846.     ROM_LOAD( "963-a29",      0x080000, 0x80000, 0x8069cd2e )        /* 8x8 tiles */
  2847.  
  2848.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2849.     ROM_LOAD( "963-a17",      0x000000, 0x80000, 0xb5239a44 )        /* sprites */
  2850.     ROM_LOAD( "963-a18",      0x080000, 0x80000, 0xdd51adef )        /* sprites */
  2851.     ROM_LOAD( "963-a15",      0x100000, 0x80000, 0x1f324eed )        /* sprites */
  2852.     ROM_LOAD( "963-a16",      0x180000, 0x80000, 0xd4bd9984 )        /* sprites */
  2853.  
  2854.     ROM_REGION( 0x0200, REGION_PROMS )
  2855.     ROM_LOAD( "tmnt.g7",      0x0000, 0x0100, 0xabd82680 )    /* sprite address decoder */
  2856.     ROM_LOAD( "tmnt.g19",     0x0100, 0x0100, 0xf8004a1c )    /* priority encoder (not used) */
  2857.  
  2858.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the samples */
  2859.     ROM_LOAD( "963-a26",      0x00000, 0x20000, 0xe2ac3063 ) /* samples for 007232 */
  2860.  
  2861.     ROM_REGION( 0x20000, REGION_SOUND2 )    /* 128k for the samples */
  2862.     ROM_LOAD( "963-a27",      0x00000, 0x20000, 0x2dfd674b ) /* samples for UPD7759C */
  2863.  
  2864.     ROM_REGION( 0x80000, REGION_SOUND3 )    /* 512k for the title music sample */
  2865.     ROM_LOAD( "963-a25",      0x00000, 0x80000, 0xfca078c7 )
  2866. ROM_END
  2867.  
  2868. ROM_START( punkshot )
  2869.     ROM_REGION( 0x40000, REGION_CPU1 )    /* 4*64k for 68000 code */
  2870.     ROM_LOAD_EVEN( "907-j02.i7",   0x00000, 0x20000, 0xdbb3a23b )
  2871.     ROM_LOAD_ODD ( "907-j03.i10",  0x00000, 0x20000, 0x2151d1ab )
  2872.  
  2873.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2874.     ROM_LOAD( "907f01.e8",    0x0000, 0x8000, 0xf040c484 )
  2875.  
  2876.     ROM_REGION( 0x80000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2877.     ROM_LOAD( "907d06.e23",   0x000000, 0x40000, 0xf5cc38f4 )
  2878.     ROM_LOAD( "907d05.e22",   0x040000, 0x40000, 0xe25774c1 )
  2879.  
  2880.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2881.     ROM_LOAD( "907d07l.k2",   0x000000, 0x80000, 0xfeeb345a )
  2882.     ROM_LOAD( "907d07h.k2",   0x080000, 0x80000, 0x0bff4383 )
  2883.     ROM_LOAD( "907d08l.k7",   0x100000, 0x80000, 0x05f3d196 )
  2884.     ROM_LOAD( "907d08h.k7",   0x180000, 0x80000, 0xeaf18c22 )
  2885.  
  2886.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* samples for 053260 */
  2887.     ROM_LOAD( "907d04.d3",    0x0000, 0x80000, 0x090feb5e )
  2888. ROM_END
  2889.  
  2890. ROM_START( punksht2 )
  2891.     ROM_REGION( 0x40000, REGION_CPU1 )    /* 4*64k for 68000 code */
  2892.     ROM_LOAD_EVEN( "907m02.i7",    0x00000, 0x20000, 0x59e14575 )
  2893.     ROM_LOAD_ODD ( "907m03.i10",   0x00000, 0x20000, 0xadb14b1e )
  2894.  
  2895.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2896.     ROM_LOAD( "907f01.e8",    0x0000, 0x8000, 0xf040c484 )
  2897.  
  2898.     ROM_REGION( 0x80000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2899.     ROM_LOAD( "907d06.e23",   0x000000, 0x40000, 0xf5cc38f4 )
  2900.     ROM_LOAD( "907d05.e22",   0x040000, 0x40000, 0xe25774c1 )
  2901.  
  2902.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2903.     ROM_LOAD( "907d07l.k2",   0x000000, 0x80000, 0xfeeb345a )
  2904.     ROM_LOAD( "907d07h.k2",   0x080000, 0x80000, 0x0bff4383 )
  2905.     ROM_LOAD( "907d08l.k7",   0x100000, 0x80000, 0x05f3d196 )
  2906.     ROM_LOAD( "907d08h.k7",   0x180000, 0x80000, 0xeaf18c22 )
  2907.  
  2908.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* samples for the 053260 */
  2909.     ROM_LOAD( "907d04.d3",    0x0000, 0x80000, 0x090feb5e )
  2910. ROM_END
  2911.  
  2912. ROM_START( lgtnfght )
  2913.     ROM_REGION( 0x40000, REGION_CPU1 )    /* 4*64k for 68000 code */
  2914.     ROM_LOAD_EVEN( "939m02.e11",   0x00000, 0x20000, 0x61a12184 )
  2915.     ROM_LOAD_ODD ( "939m03.e15",   0x00000, 0x20000, 0x6db6659d )
  2916.  
  2917.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2918.     ROM_LOAD( "939e01.d7",    0x0000, 0x8000, 0x4a5fc848 )
  2919.  
  2920.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2921.     ROM_LOAD( "939a07.k14",   0x000000, 0x80000, 0x7955dfcf )
  2922.     ROM_LOAD( "939a08.k19",   0x080000, 0x80000, 0xed95b385 )
  2923.  
  2924.     ROM_REGION( 0x100000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2925.     ROM_LOAD( "939a06.k8",    0x000000, 0x80000, 0xe393c206 )
  2926.     ROM_LOAD( "939a05.k2",    0x080000, 0x80000, 0x3662d47a )
  2927.  
  2928.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* samples for the 053260 */
  2929.     ROM_LOAD( "939a04.c5",    0x0000, 0x80000, 0xc24e2b6e )
  2930. ROM_END
  2931.  
  2932. ROM_START( trigon )
  2933.     ROM_REGION( 0x40000, REGION_CPU1 )    /* 4*64k for 68000 code */
  2934.     ROM_LOAD_EVEN( "939j02.bin",   0x00000, 0x20000, 0x38381d1b )
  2935.     ROM_LOAD_ODD ( "939j03.bin",   0x00000, 0x20000, 0xb5beddcd )
  2936.  
  2937.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  2938.     ROM_LOAD( "939e01.d7",    0x0000, 0x8000, 0x4a5fc848 )
  2939.  
  2940.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2941.     ROM_LOAD( "939a07.k14",   0x000000, 0x80000, 0x7955dfcf )
  2942.     ROM_LOAD( "939a08.k19",   0x080000, 0x80000, 0xed95b385 )
  2943.  
  2944.     ROM_REGION( 0x100000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2945.     ROM_LOAD( "939a06.k8",    0x000000, 0x80000, 0xe393c206 )
  2946.     ROM_LOAD( "939a05.k2",    0x080000, 0x80000, 0x3662d47a )
  2947.  
  2948.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* samples for the 053260 */
  2949.     ROM_LOAD( "939a04.c5",    0x0000, 0x80000, 0xc24e2b6e )
  2950. ROM_END
  2951.  
  2952. ROM_START( blswhstl )
  2953.     ROM_REGION( 0x80000, REGION_CPU1 )
  2954.     ROM_LOAD_EVEN( "e09.bin",     0x000000, 0x20000, 0xe8b7b234 )
  2955.     ROM_LOAD_ODD ( "g09.bin",     0x000000, 0x20000, 0x3c26d281 )
  2956.     ROM_LOAD_EVEN( "e11.bin",     0x040000, 0x20000, 0x14628736 )
  2957.     ROM_LOAD_ODD ( "g11.bin",     0x040000, 0x20000, 0xf738ad4a )
  2958.  
  2959.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  2960.     ROM_LOAD( "060_j01.rom",  0x0000, 0x10000, 0xf9d9a673 )
  2961.  
  2962.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2963.     ROM_LOAD_GFX_SWAP( "060_e07.r16",  0x000000, 0x080000, 0xc400edf3 )    /* tiles */
  2964.     ROM_LOAD_GFX_SWAP( "060_e08.r16",  0x080000, 0x080000, 0x70dddba1 )
  2965.  
  2966.     ROM_REGION( 0x100000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2967.     ROM_LOAD_GFX_SWAP( "060_e06.r16",  0x000000, 0x080000, 0x09381492 )    /* sprites */
  2968.     ROM_LOAD_GFX_SWAP( "060_e05.r16",  0x080000, 0x080000, 0x32454241 )
  2969.  
  2970.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  2971.     ROM_LOAD( "060_e04.r16",  0x0000, 0x100000, 0xc680395d )
  2972. ROM_END
  2973.  
  2974. ROM_START( detatwin )
  2975.     ROM_REGION( 0x80000, REGION_CPU1 )
  2976.     ROM_LOAD_EVEN( "060_j02.rom", 0x000000, 0x20000, 0x11b761ac )
  2977.     ROM_LOAD_ODD ( "060_j03.rom", 0x000000, 0x20000, 0x8d0b588c )
  2978.     ROM_LOAD_EVEN( "060_j09.rom", 0x040000, 0x20000, 0xf2a5f15f )
  2979.     ROM_LOAD_ODD ( "060_j10.rom", 0x040000, 0x20000, 0x36eefdbc )
  2980.  
  2981.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  2982.     ROM_LOAD( "060_j01.rom",  0x0000, 0x10000, 0xf9d9a673 )
  2983.  
  2984.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  2985.     ROM_LOAD_GFX_SWAP( "060_e07.r16",  0x000000, 0x080000, 0xc400edf3 )    /* tiles */
  2986.     ROM_LOAD_GFX_SWAP( "060_e08.r16",  0x080000, 0x080000, 0x70dddba1 )
  2987.  
  2988.     ROM_REGION( 0x100000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  2989.     ROM_LOAD_GFX_SWAP( "060_e06.r16",  0x000000, 0x080000, 0x09381492 )    /* sprites */
  2990.     ROM_LOAD_GFX_SWAP( "060_e05.r16",  0x080000, 0x080000, 0x32454241 )
  2991.  
  2992.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  2993.     ROM_LOAD( "060_e04.r16",  0x0000, 0x100000, 0xc680395d )
  2994. ROM_END
  2995.  
  2996. ROM_START( glfgreat )
  2997.     ROM_REGION( 0x40000, REGION_CPU1 )
  2998.     ROM_LOAD_EVEN( "061l02.1h",   0x000000, 0x20000, 0xac7399f4 )
  2999.     ROM_LOAD_ODD ( "061l03.4h",   0x000000, 0x20000, 0x77b0ff5c )
  3000.  
  3001.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3002.     ROM_LOAD( "061f01.4e",    0x0000, 0x8000, 0xab9a2a57 )
  3003.  
  3004.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3005.     ROM_LOAD( "061d14.12l",   0x000000, 0x080000, 0xb9440924 )    /* tiles */
  3006.     ROM_LOAD( "061d13.12k",   0x080000, 0x080000, 0x9f999f0b )
  3007.  
  3008.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3009.     ROM_LOAD( "061d11.3k",    0x000000, 0x100000, 0xc45b66a3 )    /* sprites */
  3010.     ROM_LOAD( "061d12.8k",    0x100000, 0x100000, 0xd305ecd1 )
  3011.  
  3012.     ROM_REGION( 0x300000, REGION_GFX3 )    /* unknown (data for the 053936?) */
  3013.     ROM_LOAD( "061b05.15d",   0x000000, 0x020000, 0x2456fb11 )    /* gfx */
  3014.     ROM_LOAD( "061b06.16d",   0x080000, 0x080000, 0x41ada2ad )
  3015.     ROM_LOAD( "061b07.18d",   0x100000, 0x080000, 0x517887e2 )
  3016.     ROM_LOAD( "061b08.14g",   0x180000, 0x080000, 0x6ab739c3 )
  3017.     ROM_LOAD( "061b09.15g",   0x200000, 0x080000, 0x42c7a603 )
  3018.     ROM_LOAD( "061b10.17g",   0x280000, 0x080000, 0x10f89ce7 )
  3019.  
  3020.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3021.     ROM_LOAD( "061e04.1d",    0x0000, 0x100000, 0x7921d8df )
  3022. ROM_END
  3023.  
  3024. ROM_START( glfgretj )
  3025.     ROM_REGION( 0x40000, REGION_CPU1 )
  3026.     ROM_LOAD_EVEN( "061j02.1h",   0x000000, 0x20000, 0x7f0d95f4 )
  3027.     ROM_LOAD_ODD ( "061j03.4h",   0x000000, 0x20000, 0x06caa38b )
  3028.  
  3029.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3030.     ROM_LOAD( "061f01.4e",    0x0000, 0x8000, 0xab9a2a57 )
  3031.  
  3032.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3033.     ROM_LOAD( "061d14.12l",   0x000000, 0x080000, 0xb9440924 )    /* tiles */
  3034.     ROM_LOAD( "061d13.12k",   0x080000, 0x080000, 0x9f999f0b )
  3035.  
  3036.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3037.     ROM_LOAD( "061d11.3k",    0x000000, 0x100000, 0xc45b66a3 )    /* sprites */
  3038.     ROM_LOAD( "061d12.8k",    0x100000, 0x100000, 0xd305ecd1 )
  3039.  
  3040.     ROM_REGION( 0x300000, REGION_GFX3 )    /* unknown (data for the 053936?) */
  3041.     ROM_LOAD( "061b05.15d",   0x000000, 0x020000, 0x2456fb11 )    /* gfx */
  3042.     ROM_LOAD( "061b06.16d",   0x080000, 0x080000, 0x41ada2ad )
  3043.     ROM_LOAD( "061b07.18d",   0x100000, 0x080000, 0x517887e2 )
  3044.     ROM_LOAD( "061b08.14g",   0x180000, 0x080000, 0x6ab739c3 )
  3045.     ROM_LOAD( "061b09.15g",   0x200000, 0x080000, 0x42c7a603 )
  3046.     ROM_LOAD( "061b10.17g",   0x280000, 0x080000, 0x10f89ce7 )
  3047.  
  3048.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3049.     ROM_LOAD( "061e04.1d",    0x0000, 0x100000, 0x7921d8df )
  3050. ROM_END
  3051.  
  3052. ROM_START( tmnt2 )
  3053.     ROM_REGION( 0x80000, REGION_CPU1 )
  3054.     ROM_LOAD_EVEN( "uaa02", 0x000000, 0x20000, 0x58d5c93d )
  3055.     ROM_LOAD_ODD ( "uaa03", 0x000000, 0x20000, 0x0541fec9 )
  3056.     ROM_LOAD_EVEN( "uaa04", 0x040000, 0x20000, 0x1d441a7d )
  3057.     ROM_LOAD_ODD ( "uaa05", 0x040000, 0x20000, 0x9c428273 )
  3058.  
  3059.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3060.     ROM_LOAD( "b01",          0x0000, 0x10000, 0x364f548a )
  3061.  
  3062.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3063.     ROM_LOAD( "b12",          0x000000, 0x080000, 0xd3283d19 )    /* tiles */
  3064.     ROM_LOAD( "b11",          0x080000, 0x080000, 0x6ebc0c15 )
  3065.  
  3066.     ROM_REGION( 0x400000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3067.     ROM_LOAD( "b09",          0x000000, 0x100000, 0x2d7a9d2a )    /* sprites */
  3068.     ROM_LOAD( "b10",          0x100000, 0x080000, 0xf2dd296e )
  3069.     /* second half empty */
  3070.     ROM_LOAD( "b07",          0x200000, 0x100000, 0xd9bee7bf )
  3071.     ROM_LOAD( "b08",          0x300000, 0x080000, 0x3b1ae36f )
  3072.     /* second half empty */
  3073.  
  3074.     ROM_REGION( 0x200000, REGION_SOUND1 )    /* samples for the 053260 */
  3075.     ROM_LOAD( "063b06",       0x0000, 0x200000, 0x1e510aa5 )
  3076. ROM_END
  3077.  
  3078. ROM_START( tmnt22p )
  3079.     ROM_REGION( 0x80000, REGION_CPU1 )
  3080.     ROM_LOAD_EVEN( "a02",   0x000000, 0x20000, 0xaadffe3a )
  3081.     ROM_LOAD_ODD ( "a03",   0x000000, 0x20000, 0x125687a8 )
  3082.     ROM_LOAD_EVEN( "a04",   0x040000, 0x20000, 0xfb5c7ded )
  3083.     ROM_LOAD_ODD ( "a05",   0x040000, 0x20000, 0x3c40fe66 )
  3084.  
  3085.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3086.     ROM_LOAD( "b01",          0x0000, 0x10000, 0x364f548a )
  3087.  
  3088.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3089.     ROM_LOAD( "b12",          0x000000, 0x080000, 0xd3283d19 )    /* tiles */
  3090.     ROM_LOAD( "b11",          0x080000, 0x080000, 0x6ebc0c15 )
  3091.  
  3092.     ROM_REGION( 0x400000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3093.     ROM_LOAD( "b09",          0x000000, 0x100000, 0x2d7a9d2a )    /* sprites */
  3094.     ROM_LOAD( "b10",          0x100000, 0x080000, 0xf2dd296e )
  3095.     /* second half empty */
  3096.     ROM_LOAD( "b07",          0x200000, 0x100000, 0xd9bee7bf )
  3097.     ROM_LOAD( "b08",          0x300000, 0x080000, 0x3b1ae36f )
  3098.     /* second half empty */
  3099.  
  3100.     ROM_REGION( 0x200000, REGION_SOUND1 )    /* samples for the 053260 */
  3101.     ROM_LOAD( "063b06",       0x0000, 0x200000, 0x1e510aa5 )
  3102. ROM_END
  3103.  
  3104. ROM_START( tmnt2a )
  3105.     ROM_REGION( 0x80000, REGION_CPU1 )
  3106.     ROM_LOAD_EVEN( "ada02", 0x000000, 0x20000, 0x4f11b587 )
  3107.     ROM_LOAD_ODD ( "ada03", 0x000000, 0x20000, 0x82a1b9ac )
  3108.     ROM_LOAD_EVEN( "ada04", 0x040000, 0x20000, 0x05ad187a )
  3109.     ROM_LOAD_ODD ( "ada05", 0x040000, 0x20000, 0xd4826547 )
  3110.  
  3111.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3112.     ROM_LOAD( "b01",          0x0000, 0x10000, 0x364f548a )
  3113.  
  3114.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3115.     ROM_LOAD( "b12",          0x000000, 0x080000, 0xd3283d19 )    /* tiles */
  3116.     ROM_LOAD( "b11",          0x080000, 0x080000, 0x6ebc0c15 )
  3117.  
  3118.     ROM_REGION( 0x400000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3119.     ROM_LOAD( "b09",          0x000000, 0x100000, 0x2d7a9d2a )    /* sprites */
  3120.     ROM_LOAD( "b10",          0x100000, 0x080000, 0xf2dd296e )
  3121.     /* second half empty */
  3122.     ROM_LOAD( "b07",          0x200000, 0x100000, 0xd9bee7bf )
  3123.     ROM_LOAD( "b08",          0x300000, 0x080000, 0x3b1ae36f )
  3124.     /* second half empty */
  3125.  
  3126.     ROM_REGION( 0x200000, REGION_SOUND1 )    /* samples for the 053260 */
  3127.     ROM_LOAD( "063b06",       0x0000, 0x200000, 0x1e510aa5 )
  3128. ROM_END
  3129.  
  3130. ROM_START( ssriders )
  3131.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3132.     ROM_LOAD_EVEN( "064eac02",    0x000000, 0x40000, 0x5a5425f4 )
  3133.     ROM_LOAD_ODD ( "064eac03",    0x000000, 0x40000, 0x093c00fb )
  3134.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3135.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3136.  
  3137.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3138.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3139.  
  3140.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3141.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3142.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3143.  
  3144.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3145.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3146.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3147.  
  3148.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3149.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3150. ROM_END
  3151.  
  3152. ROM_START( ssrdrebd )
  3153.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3154.     ROM_LOAD_EVEN( "064ebd02",    0x000000, 0x40000, 0x8deef9ac )
  3155.     ROM_LOAD_ODD ( "064ebd03",    0x000000, 0x40000, 0x2370c107 )
  3156.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3157.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3158.  
  3159.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3160.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3161.  
  3162.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3163.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3164.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3165.  
  3166.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3167.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3168.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3169.  
  3170.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3171.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3172. ROM_END
  3173.  
  3174. ROM_START( ssrdrebc )
  3175.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3176.     ROM_LOAD_EVEN( "sr_c02.rom",  0x000000, 0x40000, 0x9bd7d164 )
  3177.     ROM_LOAD_ODD ( "sr_c03.rom",  0x000000, 0x40000, 0x40fd4165 )
  3178.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3179.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3180.  
  3181.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3182.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3183.  
  3184.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3185.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3186.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3187.  
  3188.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3189.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3190.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3191.  
  3192.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3193.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3194. ROM_END
  3195.  
  3196. ROM_START( ssrdruda )
  3197.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3198.     ROM_LOAD_EVEN( "064uda02",    0x000000, 0x40000, 0x5129a6b7 )
  3199.     ROM_LOAD_ODD ( "064uda03",    0x000000, 0x40000, 0x9f887214 )
  3200.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3201.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3202.  
  3203.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3204.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3205.  
  3206.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3207.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3208.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3209.  
  3210.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3211.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3212.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3213.  
  3214.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3215.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3216. ROM_END
  3217.  
  3218. ROM_START( ssrdruac )
  3219.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3220.     ROM_LOAD_EVEN( "064uac02",    0x000000, 0x40000, 0x870473b6 )
  3221.     ROM_LOAD_ODD ( "064uac03",    0x000000, 0x40000, 0xeadf289a )
  3222.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3223.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3224.  
  3225.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3226.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3227.  
  3228.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3229.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3230.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3231.  
  3232.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3233.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3234.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3235.  
  3236.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3237.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3238. ROM_END
  3239.  
  3240. ROM_START( ssrdrubc )
  3241.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3242.     ROM_LOAD_EVEN( "2pl.8e",      0x000000, 0x40000, 0xaca7fda5 )
  3243.     ROM_LOAD_ODD ( "2pl.8g",      0x000000, 0x40000, 0xbb1fdeff )
  3244.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3245.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3246.  
  3247.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3248.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3249.  
  3250.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3251.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3252.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3253.  
  3254.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3255.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3256.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3257.  
  3258.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3259.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3260. ROM_END
  3261.  
  3262. ROM_START( ssrdrabd )
  3263.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3264.     ROM_LOAD_EVEN( "064abd02.8e", 0x000000, 0x40000, 0x713406cb )
  3265.     ROM_LOAD_ODD ( "064abd03.8g", 0x000000, 0x40000, 0x680feb3c )
  3266.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3267.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3268.  
  3269.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3270.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3271.  
  3272.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3273.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3274.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3275.  
  3276.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3277.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3278.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3279.  
  3280.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3281.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3282. ROM_END
  3283.  
  3284. ROM_START( ssrdrjbd )
  3285.     ROM_REGION( 0xc0000, REGION_CPU1 )
  3286.     ROM_LOAD_EVEN( "064jbd02.8e", 0x000000, 0x40000, 0x7acdc1e3 )
  3287.     ROM_LOAD_ODD ( "064jbd03.8g", 0x000000, 0x40000, 0x6a424918 )
  3288.     ROM_LOAD_EVEN( "sr_b04.rom",  0x080000, 0x20000, 0xef2315bd )
  3289.     ROM_LOAD_ODD ( "sr_b05.rom",  0x080000, 0x20000, 0x51d6fbc4 )
  3290.  
  3291.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3292.     ROM_LOAD( "sr_e01.rom",   0x0000, 0x10000, 0x44b9bc52 )
  3293.  
  3294.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3295.     ROM_LOAD( "sr_16k.rom",   0x000000, 0x080000, 0xe2bdc619 )    /* tiles */
  3296.     ROM_LOAD( "sr_12k.rom",   0x080000, 0x080000, 0x2d8ca8b0 )
  3297.  
  3298.     ROM_REGION( 0x200000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3299.     ROM_LOAD( "sr_7l.rom",    0x000000, 0x100000, 0x4160c372 )    /* sprites */
  3300.     ROM_LOAD( "sr_3l.rom",    0x100000, 0x100000, 0x64dd673c )
  3301.  
  3302.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* samples for the 053260 */
  3303.     ROM_LOAD( "sr_1d.rom",    0x0000, 0x100000, 0x59810df9 )
  3304. ROM_END
  3305.  
  3306. ROM_START( thndrx2 )
  3307.     ROM_REGION( 0x40000, REGION_CPU1 )
  3308.     ROM_LOAD_EVEN( "073-k02.11c", 0x000000, 0x20000, 0x0c8b2d3f )
  3309.     ROM_LOAD_ODD ( "073-k03.12c", 0x000000, 0x20000, 0x3803b427 )
  3310.  
  3311.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  3312.     ROM_LOAD( "073-c01.4f",   0x0000, 0x10000, 0x44ebe83c )
  3313.  
  3314.     ROM_REGION( 0x100000, REGION_GFX1 )    /* graphics (addressable by the main CPU) */
  3315.     ROM_LOAD( "073-c06.16k",  0x000000, 0x080000, 0x24e22b42 )    /* tiles */
  3316.     ROM_LOAD( "073-c05.12k",  0x080000, 0x080000, 0x952a935f )
  3317.  
  3318.     ROM_REGION( 0x100000, REGION_GFX2 )    /* graphics (addressable by the main CPU) */
  3319.     ROM_LOAD( "073-c07.7k",   0x000000, 0x080000, 0x14e93f38 )    /* sprites */
  3320.     ROM_LOAD( "073-c08.3k",   0x080000, 0x080000, 0x09fab3ab )
  3321.  
  3322.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* samples for the 053260 */
  3323.     ROM_LOAD( "073-b04.2d",   0x0000, 0x80000, BADCRC( 0x7f7f2fd3 ) )
  3324. ROM_END
  3325.  
  3326.  
  3327.  
  3328. static void init_gfx(void)
  3329. {
  3330.     konami_rom_deinterleave_2(REGION_GFX1);
  3331.     konami_rom_deinterleave_2(REGION_GFX2);
  3332. }
  3333.  
  3334. static void init_mia(void)
  3335. {
  3336.     unsigned char *gfxdata;
  3337.     int len;
  3338.     int i,j,k,A,B;
  3339.     int bits[32];
  3340.     unsigned char *temp;
  3341.  
  3342.  
  3343.     init_gfx();
  3344.  
  3345.     /*
  3346.         along with the normal byte reordering, TMNT also needs the bits to
  3347.         be shuffled around because the ROMs are connected differently to the
  3348.         051962 custom IC.
  3349.     */
  3350.     gfxdata = memory_region(REGION_GFX1);
  3351.     len = memory_region_length(REGION_GFX1);
  3352.     for (i = 0;i < len;i += 4)
  3353.     {
  3354.         for (j = 0;j < 4;j++)
  3355.             for (k = 0;k < 8;k++)
  3356.                 bits[8*j + k] = (gfxdata[i + j] >> k) & 1;
  3357.  
  3358.         for (j = 0;j < 4;j++)
  3359.         {
  3360.             gfxdata[i + j] = 0;
  3361.             for (k = 0;k < 8;k++)
  3362.                 gfxdata[i + j] |= bits[j + 4*k] << k;
  3363.         }
  3364.     }
  3365.  
  3366.     /*
  3367.         along with the normal byte reordering, MIA also needs the bits to
  3368.         be shuffled around because the ROMs are connected differently to the
  3369.         051937 custom IC.
  3370.     */
  3371.     gfxdata = memory_region(REGION_GFX2);
  3372.     len = memory_region_length(REGION_GFX2);
  3373.     for (i = 0;i < len;i += 4)
  3374.     {
  3375.         for (j = 0;j < 4;j++)
  3376.             for (k = 0;k < 8;k++)
  3377.                 bits[8*j + k] = (gfxdata[i + j] >> k) & 1;
  3378.  
  3379.         for (j = 0;j < 4;j++)
  3380.         {
  3381.             gfxdata[i + j] = 0;
  3382.             for (k = 0;k < 8;k++)
  3383.                 gfxdata[i + j] |= bits[j + 4*k] << k;
  3384.         }
  3385.     }
  3386.  
  3387.     temp = malloc(len);
  3388.     if (!temp) return;    /* bad thing! */
  3389.     memcpy(temp,gfxdata,len);
  3390.     for (A = 0;A < len/4;A++)
  3391.     {
  3392.         /* the bits to scramble are the low 8 ones */
  3393.         for (i = 0;i < 8;i++)
  3394.             bits[i] = (A >> i) & 0x01;
  3395.  
  3396.         B = A & 0x3ff00;
  3397.  
  3398.         if ((A & 0x3c000) == 0x3c000)
  3399.         {
  3400.             B |= bits[3] << 0;
  3401.             B |= bits[5] << 1;
  3402.             B |= bits[0] << 2;
  3403.             B |= bits[1] << 3;
  3404.             B |= bits[2] << 4;
  3405.             B |= bits[4] << 5;
  3406.             B |= bits[6] << 6;
  3407.             B |= bits[7] << 7;
  3408.         }
  3409.         else
  3410.         {
  3411.             B |= bits[3] << 0;
  3412.             B |= bits[5] << 1;
  3413.             B |= bits[7] << 2;
  3414.             B |= bits[0] << 3;
  3415.             B |= bits[1] << 4;
  3416.             B |= bits[2] << 5;
  3417.             B |= bits[4] << 6;
  3418.             B |= bits[6] << 7;
  3419.         }
  3420.  
  3421.         gfxdata[4*A+0] = temp[4*B+0];
  3422.         gfxdata[4*A+1] = temp[4*B+1];
  3423.         gfxdata[4*A+2] = temp[4*B+2];
  3424.         gfxdata[4*A+3] = temp[4*B+3];
  3425.     }
  3426.     free(temp);
  3427. }
  3428.  
  3429.  
  3430. static void init_tmnt(void)
  3431. {
  3432.     unsigned char *gfxdata;
  3433.     int len;
  3434.     int i,j,k,A,B,entry;
  3435.     int bits[32];
  3436.     unsigned char *temp;
  3437.  
  3438.  
  3439.     init_gfx();
  3440.  
  3441.     /*
  3442.         along with the normal byte reordering, TMNT also needs the bits to
  3443.         be shuffled around because the ROMs are connected differently to the
  3444.         051962 custom IC.
  3445.     */
  3446.     gfxdata = memory_region(REGION_GFX1);
  3447.     len = memory_region_length(REGION_GFX1);
  3448.     for (i = 0;i < len;i += 4)
  3449.     {
  3450.         for (j = 0;j < 4;j++)
  3451.             for (k = 0;k < 8;k++)
  3452.                 bits[8*j + k] = (gfxdata[i + j] >> k) & 1;
  3453.  
  3454.         for (j = 0;j < 4;j++)
  3455.         {
  3456.             gfxdata[i + j] = 0;
  3457.             for (k = 0;k < 8;k++)
  3458.                 gfxdata[i + j] |= bits[j + 4*k] << k;
  3459.         }
  3460.     }
  3461.  
  3462.     /*
  3463.         along with the normal byte reordering, TMNT also needs the bits to
  3464.         be shuffled around because the ROMs are connected differently to the
  3465.         051937 custom IC.
  3466.     */
  3467.     gfxdata = memory_region(REGION_GFX2);
  3468.     len = memory_region_length(REGION_GFX2);
  3469.     for (i = 0;i < len;i += 4)
  3470.     {
  3471.         for (j = 0;j < 4;j++)
  3472.             for (k = 0;k < 8;k++)
  3473.                 bits[8*j + k] = (gfxdata[i + j] >> k) & 1;
  3474.  
  3475.         for (j = 0;j < 4;j++)
  3476.         {
  3477.             gfxdata[i + j] = 0;
  3478.             for (k = 0;k < 8;k++)
  3479.                 gfxdata[i + j] |= bits[j + 4*k] << k;
  3480.         }
  3481.     }
  3482.  
  3483.     temp = malloc(len);
  3484.     if (!temp) return;    /* bad thing! */
  3485.     memcpy(temp,gfxdata,len);
  3486.     for (A = 0;A < len/4;A++)
  3487.     {
  3488.         unsigned char *code_conv_table = &memory_region(REGION_PROMS)[0x0000];
  3489. #define CA0 0
  3490. #define CA1 1
  3491. #define CA2 2
  3492. #define CA3 3
  3493. #define CA4 4
  3494. #define CA5 5
  3495. #define CA6 6
  3496. #define CA7 7
  3497. #define CA8 8
  3498. #define CA9 9
  3499.  
  3500.         /* following table derived from the schematics. It indicates, for each of the */
  3501.         /* 9 low bits of the sprite line address, which bit to pick it from. */
  3502.         /* For example, when the PROM contains 4, which applies to 4x2 sprites, */
  3503.         /* bit OA1 comes from CA5, OA2 from CA0, and so on. */
  3504.         static unsigned char bit_pick_table[10][8] =
  3505.         {
  3506.             /*0(1x1) 1(2x1) 2(1x2) 3(2x2) 4(4x2) 5(2x4) 6(4x4) 7(8x8) */
  3507.             { CA3,   CA3,   CA3,   CA3,   CA3,   CA3,   CA3,   CA3 },    /* CA3 */
  3508.             { CA0,   CA0,   CA5,   CA5,   CA5,   CA5,   CA5,   CA5 },    /* OA1 */
  3509.             { CA1,   CA1,   CA0,   CA0,   CA0,   CA7,   CA7,   CA7 },    /* OA2 */
  3510.             { CA2,   CA2,   CA1,   CA1,   CA1,   CA0,   CA0,   CA9 },    /* OA3 */
  3511.             { CA4,   CA4,   CA2,   CA2,   CA2,   CA1,   CA1,   CA0 },    /* OA4 */
  3512.             { CA5,   CA6,   CA4,   CA4,   CA4,   CA2,   CA2,   CA1 },    /* OA5 */
  3513.             { CA6,   CA5,   CA6,   CA6,   CA6,   CA4,   CA4,   CA2 },    /* OA6 */
  3514.             { CA7,   CA7,   CA7,   CA7,   CA8,   CA6,   CA6,   CA4 },    /* OA7 */
  3515.             { CA8,   CA8,   CA8,   CA8,   CA7,   CA8,   CA8,   CA6 },    /* OA8 */
  3516.             { CA9,   CA9,   CA9,   CA9,   CA9,   CA9,   CA9,   CA8 }    /* OA9 */
  3517.         };
  3518.  
  3519.         /* pick the correct entry in the PROM (top 8 bits of the address) */
  3520.         entry = code_conv_table[(A & 0x7f800) >> 11] & 7;
  3521.  
  3522.         /* the bits to scramble are the low 10 ones */
  3523.         for (i = 0;i < 10;i++)
  3524.             bits[i] = (A >> i) & 0x01;
  3525.  
  3526.         B = A & 0x7fc00;
  3527.  
  3528.         for (i = 0;i < 10;i++)
  3529.             B |= bits[bit_pick_table[i][entry]] << i;
  3530.  
  3531.         gfxdata[4*A+0] = temp[4*B+0];
  3532.         gfxdata[4*A+1] = temp[4*B+1];
  3533.         gfxdata[4*A+2] = temp[4*B+2];
  3534.         gfxdata[4*A+3] = temp[4*B+3];
  3535.     }
  3536.     free(temp);
  3537. }
  3538.  
  3539. static void shuffle(UINT8 *buf,int len)
  3540. {
  3541.     int i;
  3542.     UINT8 t;
  3543.  
  3544.     if (len == 2) return;
  3545.  
  3546.     if (len % 4) exit(1);    /* must not happen */
  3547.  
  3548.     len /= 2;
  3549.  
  3550.     for (i = 0;i < len/2;i++)
  3551.     {
  3552.         t = buf[len/2 + i];
  3553.         buf[len/2 + i] = buf[len + i];
  3554.         buf[len + i] = t;
  3555.     }
  3556.  
  3557.     shuffle(buf,len);
  3558.     shuffle(buf + len,len);
  3559. }
  3560.  
  3561. static void init_glfgreat(void)
  3562. {
  3563.     /* ROMs are interleaved at byte level */
  3564.     shuffle(memory_region(REGION_GFX1),memory_region_length(REGION_GFX1));
  3565.     shuffle(memory_region(REGION_GFX2),memory_region_length(REGION_GFX2));
  3566. }
  3567.  
  3568.  
  3569.  
  3570. GAME( 1989, mia,      0,        mia,      mia,      mia,      ROT0,  "Konami", "Missing in Action (version T)" )
  3571. GAME( 1989, mia2,     mia,      mia,      mia,      mia,      ROT0,  "Konami", "Missing in Action (version S)" )
  3572.  
  3573. GAME( 1989, tmnt,     0,        tmnt,     tmnt,     tmnt,     ROT0,  "Konami", "Teenage Mutant Ninja Turtles (4 Players US)" )
  3574. GAME( 1989, tmht,     tmnt,     tmnt,     tmnt,     tmnt,     ROT0,  "Konami", "Teenage Mutant Hero Turtles (4 Players UK)" )
  3575. GAME( 1989, tmntj,    tmnt,     tmnt,     tmnt,     tmnt,     ROT0,  "Konami", "Teenage Mutant Ninja Turtles (4 Players Japan)" )
  3576. GAME( 1989, tmht2p,   tmnt,     tmnt,     tmnt2p,   tmnt,     ROT0,  "Konami", "Teenage Mutant Hero Turtles (2 Players UK)" )
  3577. GAME( 1990, tmnt2pj,  tmnt,     tmnt,     tmnt2p,   tmnt,     ROT0,  "Konami", "Teenage Mutant Ninja Turtles (2 Players Japan)" )
  3578.  
  3579. GAME( 1990, punkshot, 0,        punkshot, punkshot, gfx,      ROT0,  "Konami", "Punk Shot (4 Players)" )
  3580. GAME( 1990, punksht2, punkshot, punkshot, punksht2, gfx,      ROT0,  "Konami", "Punk Shot (2 Players)" )
  3581.  
  3582. GAME( 1990, lgtnfght, 0,        lgtnfght, lgtnfght, gfx,      ROT90, "Konami", "Lightning Fighters (US)" )
  3583. GAME( 1990, trigon,   lgtnfght, lgtnfght, lgtnfght, gfx,      ROT90, "Konami", "Trigon (Japan)" )
  3584.  
  3585. GAME( 1991, blswhstl, 0,        detatwin, detatwin, gfx,      ROT90, "Konami", "Bells & Whistles" )
  3586. GAME( 1991, detatwin, blswhstl, detatwin, detatwin, gfx,      ROT90, "Konami", "Detana!! Twin Bee (Japan)" )
  3587.  
  3588. GAMEX(1991, glfgreat, 0,        glfgreat, glfgreat, glfgreat, ROT0,  "Konami", "Golfing Greats", GAME_NOT_WORKING )
  3589. GAMEX(1991, glfgretj, glfgreat, glfgreat, glfgreat, glfgreat, ROT0,  "Konami", "Golfing Greats (Japan)", GAME_NOT_WORKING )
  3590.  
  3591. GAMEX(1991, tmnt2,    0,        tmnt2,    ssridr4p, gfx,      ROT0,  "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players US)", GAME_IMPERFECT_COLORS )
  3592. GAMEX(1991, tmnt22p,  tmnt2,    tmnt2,    ssriders, gfx,      ROT0,  "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (2 Players US)", GAME_IMPERFECT_COLORS )
  3593. GAMEX(1991, tmnt2a,   tmnt2,    tmnt2,    tmnt2a,   gfx,      ROT0,  "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players Asia)", GAME_IMPERFECT_COLORS )
  3594.  
  3595. GAME( 1991, ssriders, 0,        ssriders, ssridr4p, gfx,      ROT0,  "Konami", "Sunset Riders (World 4 Players ver. EAC)" )
  3596. GAME( 1991, ssrdrebd, ssriders, ssriders, ssriders, gfx,      ROT0,  "Konami", "Sunset Riders (World 2 Players ver. EBD)" )
  3597. GAME( 1991, ssrdrebc, ssriders, ssriders, ssriders, gfx,      ROT0,  "Konami", "Sunset Riders (World 2 Players ver. EBC)" )
  3598. GAME( 1991, ssrdruda, ssriders, ssriders, ssriders, gfx,      ROT0,  "Konami", "Sunset Riders (US 4 Players ver. UDA)" )
  3599. GAME( 1991, ssrdruac, ssriders, ssriders, ssriders, gfx,      ROT0,  "Konami", "Sunset Riders (US 4 Players ver. UAC)" )
  3600. GAME( 1991, ssrdrubc, ssriders, ssriders, ssriders, gfx,      ROT0,  "Konami", "Sunset Riders (US 2 Players ver. UBC)" )
  3601. GAME( 1991, ssrdrabd, ssriders, ssriders, ssriders, gfx,      ROT0,  "Konami", "Sunset Riders (Asia 2 Players ver. ABD)" )
  3602. GAME( 1991, ssrdrjbd, ssriders, ssriders, ssriders, gfx,      ROT0,  "Konami", "Sunset Riders (Japan 2 Players ver. JBD)" )
  3603.  
  3604. GAME( 1991, thndrx2,  0,        thndrx2,  thndrx2,  gfx,      ROT0,  "Konami", "Thunder Cross II (Japan)" )
  3605.